Add review Button in course page

Add the following code in wplms-customizer.php or child theme->functions.php

add_action('wplms_after_course_description','myreview_button');
function myreview_button(){
    $course_id = get_the_ID();
    $user_id = get_current_user_id();
    ?>
    <form action="<?php echo get_permalink($course_id); ?>" method="post">
    <input type="submit" name="review_course" class="review_course unit_button full button" value="<?php _e('REVIEW COURSE ','vibe'); ?>" />
    <?php wp_nonce_field($course_id,'review'); ?>
    </form>
    <?php
 
}

 

Was this article helpful?

Related Articles

6 Comments

  1. fabioamv

    Hi,
    thanks, but you could still use images for better understanding…

    1. nena14

      I agree. It would eg be nice to see a image of the result so you know if you want this or not.

  2. Royal Bank of CanadaRoyal Bank’s strong domestic franchise, leading capital markets position, expanding wealth management business, proven conservative credit culture and record of growing dividends are appealing. Concerns that the Canadian housing market is slowing are overdone. The valuation is attractive and the stock offers a current dividend yield of 4.2 per cent.
    italia maglia 2014 [url=http://faicircolare.it/absolute-links/for-wordpress/admin/dashboards/driv/qiuyi/ers/include6/yidaqiuyi/konaeiqw-p-080.html]italia maglia 2014[/url]

  3. thexlearner

    I get this error when I add that code :
    Fatal error: syntax error, unexpected ‘$course_id’ (T_VARIABLE)

    1. ryu

      You no longer need it. Enable the switch in course settings.

Leave A Comment?