add another "take this course" or Continue Course button to top of course descrp

Home Forums Legacy Support Support queries How-to & Troubleshooting add another "take this course" or Continue Course button to top of course descrp

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #92053
    a4da
    Spectator
    Hello, I would like to add a 2nd "take this course/continue course" button to the top of each course page as now it is half way down the page and students have a hard time finding it. I saw that you gave the tip  but only for mobile or tablet. I would like the 2nd button to be on all devices. (mobile, desktop, tablet...) I saw the code for mobile below on tips but how can I add to all devices ? Possible add it to the top of each course page where it lists  HOME - CURRICULUM - EVENTS  "take this course" add_action('bp_before_course_body','add_second_take_course_button'); function add_second_take_course_button(){ echo '<div class="extra_course_button" style="display: none;">'; the_course_button(); echo '</div>'; echo '<style> @media(max-width:768px){ .extra_course_button {display:block !important;} } </style>'; }
    #92214
    H.K. Latiyan
    Participant
    For that you can add the bellow code instead: add_action('bp_before_course_body',function(){the_course_button();});
    #92723
    a4da
    Spectator
    My apologies for silly question, I know you are very busy but I am not a developer or coder. Just to clarify, 1. am I replacing just a piece of the original code with your suggestion above? can you please give me the exact code to place 2. Am I supposed to put something inside the brackets since they are empty Like in line 2 below  - <span style="color: #4b4d4d; font-family: Lato; font-size: 14px;">function add_second_take_course_button( ) {</span> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"></p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;">Code to be added for a 2nd additional button in each course:</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;">add_action('bp_before_course_body','add_second_take_course_button');</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;">function add_second_take_course_button(){</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;">echo '<div class="extra_course_button" style="display: none;">';</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;">the_course_button();</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;">echo '</div>';</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;">echo '<style></p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;">@media(max-width:768px){</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;">.extra_course_button {display:block !important;}</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;">}</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;"></style>';</p> <p style="box-sizing: border-box; margin: 0px 0px 22px; color: #4b4d4d; font-family: Lato; font-size: 14px;">}</p>
    #92732
    a4da
    Spectator
    I got it and works great. Thank you
    #92736
    a4da
    Spectator
    I use Bp - groups for students to pick a specific course date to enroll. I had a coder set up so once student makes payment they are required to selected the specific class date to enroll but with this code it does not require students to  select course date to enroll in the course.  I tested and once the "new" take this button is selected and student makes payment the course is not in there account. Would there be something else I need to add to the code if it is part of the batches/bp groups that requires students to go back and select a course date ?
    #92860
    H.K. Latiyan
    Participant
    Thanks for the update that the original issue is resolved. I am not sure what code you are using, but there is already a wplms batches addon for this purpose. You can create batches for different dates and connect it to the course. Once the user purchases the course then he/she can join any batch and then start the course according to the date and time set in the batch. If you have any issues related to the batch then you can create a topic in the wplms batches forum.
    #92861
    H.K. Latiyan
    Participant
    Since the topic is resolved so closing the topic.
Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘add another "take this course" or Continue Course button to top of course descrp’ is closed to new replies.