TIPS: Add another "take this course" button to the course

Home Forums Legacy Support Support queries How-to & Troubleshooting TIPS: Add another "take this course" button to the course

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #69118
    Halvard
    Participant
    Hi guys, I just made a great discovery and i just wanted to let you know about it. The problem was that the "take this course" button is located really far down on the page on mobile devices. And most of my trafic is from mobile devices. So i figured that i could add a new "take this course" button in the course text. Take a look here: https://www.nettbasertekurs.no/nettkurs/innbokskontroll/   This is the HTML code i added in the course text: <p class="p1"><span class="s1"><p style="text-align: center;">[button url="https://www.nettbasertekurs.no/produkt/innbokskontroll/?redirect" class="" bg="" hover_bg="" size="0px" color="" radius="0px" width="0px" height="0px" target="_self"] <span style="color: #ffffff;">Ta dette kurset</span> [/button]</p>   NB:
    • I have "skip cart" enableled.
    • Just change the bold text and it will work for you too
    • The link i use is the same as the link in the original "take this course" button.
     
    #69203
    H.K. Latiyan
    Participant
    Well yes this is one way to achieve this, but you'll have to add the button shortcode in every course description. Instead use the bellow code in your wplms-customizer.php file present in your wplms customizer plugin (wp-admin->plugins->editor->wplms customizer plugin): 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>'; } This will add the course button in every course just before staring of the course description only in the mobile and tab devices. For desktop there will be no change. Let me know if this helps.
    #69276
    Halvard
    Participant
    Wow, forget my tip, this is way more awesome! Thank you so much :)
    #69387
    H.K. Latiyan
    Participant
    Ok Thanks for the confirmation, so marking the topic as resolved and closing the topic.
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘TIPS: Add another "take this course" button to the course’ is closed to new replies.