Course Button shortcode

Course_button shortcode is available in Vibe Shortcodes 2.0 +.

Using this shortcode you can embed the Course button in any landing page just using the Course id.

Example : http://vibethemes.com/demo/wplms/landing-page-for-course/

if (!function_exists('vibe_course_button')) {
    function vibe_course_button( $atts, $content = null ) {
            extract(shortcode_atts(array(
                    'id'   => '',
                ), $atts));
            $return = '';
            if(!empty($id)){
                ob_start();
                the_course_button($id);    
                $return = ob_get_clean();
            }
            
        return $return;
    }
    add_shortcode('course_button', 'vibe_course_button');
}

 

Was this article helpful?

3 Comments

  1. danayster

    THanks Vibe. For anyone else, note: this is just for previous versions. As its going to be included in 2.0 and onward.

Leave A Comment?