Apply popup directly to take this course button for nonlogged in – free course

Home Forums Legacy Support Support queries How-to & Troubleshooting Apply popup directly to take this course button for nonlogged in – free course

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #93858
    chinolz
    Spectator
    https://wplms.io/support/knowledge-base/open-login-popup-on-free-course-login-error/ i want to modify this and apply the popup action directly when user clicks on take this course button instead of clicking the "You must be logged in to take this course → LOGIN | REGISTER NOW"
    #93978
    H.K. Latiyan
    Participant
    You can try adding the bellow code instead: add_action('wp_footer','trigger_login_popup_course_error'); function trigger_login_popup_course_error(){   global $post;   if($post->post_type != 'course' || is_user_logged_in())     return;     $free = get_post_meta($post->ID,'vibe_course_free',true);   if(function_exists('vibe_validate') && vibe_validate($free)){   ?><script>   jQuery("document").ready(function($){     $(".button.course_button").on('click',function(event){       event.preventDefault();       $('.smallimg.vbplogin').trigger('click');     });   });   </script>';   <?php   } }
    #94029
    chinolz
    Spectator
    thx
    #94063
    H.K. Latiyan
    Participant
    Thanks for confirming, so closing the topic.
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Apply popup directly to take this course button for nonlogged in – free course’ is closed to new replies.