How to make Custom Course Button shortcode?

Home Forums Legacy Support Support queries Styling issues How to make Custom Course Button shortcode?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #172274
    yudhafebrian
    Spectator
    Hi, i need your help, i want to make custom shortcode of [course_button id] like this: http://prntscr.com/khjqds i need to add locked icon for unpurchased course & unlocked icon for purchased course thank you
    #172306
    MrVibe
    Keymaster
    Try adding this code in your child theme - funcitons.php   add_shortcode('yudhafebrian_course_button',function($atts,$content){ extract(shortcode_atts(array( 'id' => '', ), $atts)); $return = ''; if(!empty($id)){ ob_start(); echo '<div class="yudhafebrian_course_button">'; the_course_button($id); echo '</div>'; $return = ob_get_clean(); } return $return; });
    #172323
    MrVibe
    Keymaster
    CSS to be included : .yudhafebrian_course_button a.course_button, .yudhafebrian_course_button a.button, .yudhafebrian_course_button input.course_button{position:relative;padding-left:60px;color:#fff !important;padding:0; width:250px !important;padding: 15px 15px 15px 30px !important; background-color: #bdc4d0 !important;border-radius: 6px 6px 6px 6px;font-size: 15px;}   .yudhafebrian_course_button input.course_button{ background:#1ace9e !important; }   .yudhafebrian_course_button a.course_button:before,.yudhafebrian_course_button a.button:before,.yudhafebrian_course_button input.course_button:before{ content:"\f023" !important; font-size:24px; font-family:'fontawesome' !important; position:absolute;left:20px; top:10px;color:#fff; }   .yudhafebrian_course_button form{position:relative;}.yudhafebrian_course_button form:before{ content:"\f09c" !important;font-family:'fontawesome' !important;position:absolute;left:70px;z-index:999;top:20px;font-size:24px;color:#fff }
    #172324
    MrVibe
    Keymaster
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘How to make Custom Course Button shortcode?’ is closed to new replies.