Customise CoursePress Join Button Links

This ticket is in relation to the button which is on the Course Overview page of the native Coursepress theme.

I am wanting to customise the button's destinations based on the following:
- If not logged in, assume the user is not a member and redirect to our custom sign up page (not a popup).
- If logged in but not yet enrolled, do as Coursepress already does and have the pop up and the rest.
- If already enrolled, take the student to the next lesson which isn't 100%. Currently under these circumstances, the button is taking the student to the most recently completed (100%) lesson.

Additionally, I would like to customise the 'Save Progress and Exit' link at the bottom of each unit in all courses to take the user to the COURSE/units page where it lists all units available in the current course.

How can I go about making these changes?

Simon

  • Kasia Swiderska
    • Support nomad

    Hello Simon,

    For those changes

    - If not logged in, assume the user is not a member and redirect to our custom sign up page (not a popup).
    - If logged in but not yet enrolled, do as Coursepress already does and have the pop up and the rest.

    you should create a child theme from the CoursePress Theme. When you have a child theme then you chan edit content-course-overview.php file.

    In line 42 where is now:

    <?php echo do_shortcode( '[course_join_button]' ); ?>

    should be

    <?php 
    
    			if (  is_user_logged_in() ) {
    
    				echo do_shortcode( '[course_join_button]' );
    
    			} else {
    
    					echo '<a href="http://yourcustomlink.com" class="apply-button">Custom link </a>';
    			}
    
    			 ?>

    For those two other changes I've send message to our developer if this is possible and if yes, how can this be done. As soon we will get feedback from them we will update this thread.

    kind regards,
    Kasia

  • Simon
    • Site Builder, Child of Zeus

    Hello Kasia,

    You're amazing - that worked perfectly. Thank you so much!
    Please ignore my other requests in my initial post, but this next change is related:

    - If already enrolled and student has begun lessons, the button will say 'Continue Learning'. When this button is pressed, I'd like it to take the student to the Units page of the course.

    I suppose this may involve editing of the shortcode [course_join_button]?

  • Simon
    • Site Builder, Child of Zeus

    Hello,

    How is my last request going?
    One other change I'd like to make is the 'Next' button at the bottom of each unit.
    When clicked, could this please do as it currently does, but instead of take the user to the next lesson, could it please take them to the Units page? Except for when the unit is the last unit in a course, then take to the course completion page as currently doing.

    Regards,
    Simon

  • Kasia Swiderska
    • Support nomad

    Hello Simon,

    I again apologize for the delay on my side - I checked chat transcript you had with Katya and she passed information about the continue button that change there is not possible due to nature of the shortcode. I sorry we don't have better news :slight_frown:

    kind regards,
    Kasia

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.