CoursePress join button shortcode not working

When I try to use [course_join_button course_id="216"] shortcode it's not rendering the necessary button. How can I fix it?

  • Predrag Dubajic
    • Support

    Hi Aviram,

    The course you are using in your shortcode doesn't allow users to enroll in it, they can only be manually added, and that's why the shortcode will not work.

    If in Step 6 of course setup you change this so that registered users can enroll then the shortcode will work.

    Best regards,
    Predrag

  • Aviram
    • New Recruit

    Ok thanks for your help!

    I can see the button now, for example in this page:
    http://p16937-310-5709.s310.upress.link/example8/

    This is the shortcode I use:
    [course_join_button course_id="101506" access_text="?????? ?????" enroll_text=??????? ??????]

    I see a small "details" button, and I would like to see the real button as described next to this shortcode:

    Shows the Join/Signup/Enroll button for the course. What it displays is dependent on the course settings and the user’s status/enrollment.
    See the attributes for possible button labels.

  • Predrag Dubajic
    • Support

    Hi Aviram,

    I was checking your shortcode further and I can see that you have some values defined and others not, and also some of the strings translated in translation files, and some not and that's affecting the text shown.

    You can remove the additional attributes from the shortcode and then translate everything from the translation files, or you can add other shortcode attributes to apply to non-translated strings.
    For example, to change details you can add details_text to your shortcode to change the Details link.
    Like this:
    [course_join_button course_id="00" details_text="NEW_TEXT"]

    Best regards,
    Predrag

  • Aviram
    • New Recruit

    Ok, I think I understand but I still can't make it work.

    I would like to display the button without attributes (only defaults) like here for example:
    http://p16937-310-5709.s310.upress.link/example-delete

    I used this shortcode without any extra attributes:
    [course_join_button course_id="101506"]

    It still doesn't appear on the page.
    I see the small "details" button instead of the "Join Now/Enroll/Purchase" button that I want.
    Screenshot included.

    Did I do anything wrong?

  • Adam Czajczyk
    • Support Gorilla

    Hello Aviram

    I checked this page: http://p16937-310-5709.s310.upress.link/example8/

    There's a thing to note though: the behavior of the link is different based on "who" is viewing it. If you check it as a logged out user, it says (according to Google Translate, I'm sorry but I don't know Hebrew) "Buy course" and after clicking on it it actually redirects to course enrollment via registration/login.

    It won't do it if you're logged in and are, for example, already a registered student or an instructor/facilitator of that course and in such case it will only take you directly to a course page.

    The other aspect is the look of it. It doesn't "look like a button" indeed but that can be changed with a small bit of CSS that you can add to your site for example via "Appearance -> Customize -> Add CSS":

    .apply-button.signup {
    	color:#FFF;
    	background-color:#F29429;
    	padding:5px 10px;
    	border:2px solid #F29429;
    }
    
    .apply-button.signup:hover {
    	background-color:#5C5C5C;
    }

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.