Customize the Buy button text for a specific course on V2 themes

I know how to Customize the "Buy" button text, but how do I target just one specific course?

You can make sure your customized text is used on specific course landing pages by adding a conditional statement to your code.

On lines 16-18 of your course_action_buttons file, which is in your Snippets folder, you can add these bolded lines:

      {% if course.user_can_purchase %}

        {% if == 12345 %}

            {% include "button" link:, button_type: "primary", text: "Special Text for Course 12345" %}

        {% else %}

            {% include "button" link:, button_type: "primary", text: course.buy_button_text %}

         {% endif %}

      {% endif %}

This will ensure that if your course id is the id of the course you want to target, your customized text will be used. Or else the default will remain!

You can find your course id by looking at your URL in your course builder:


Don't forget to save the file, and to make a note that you've made this change in case you want to go back or update your Themes.

Preview your site to make sure it works! 

If you have a question about this or another Theme customization, write us a note here: