Coming Soon Button Custom link

Home Forums Legacy Support Support queries Other issues Coming Soon Button Custom link

Tagged: 

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #14785
    No One
    Spectator
    I need to add a link for collecting users who want to take this (coming soon) course, If it possible to add a custom link to connect "Coming Soon Button" to a form page to collect course subscribers. * Like this solution : https://wplms.io/support/knowledge-base/connect-take-this-course-button-to-external-page/   Thanks  
    #14878
    Anshuman Sahu
    Keymaster
    Please try adding the given code in your wplms-customizer.php file in wplms customizer plugin . add_filter('wplms_take_course_button','coming_soon_link',10,2); function coming_soon_link($html,$course_id){ $coming_soon = get_post_meta($course_id,'vibe_coming_soon',true); if(vibe_validate($coming_soon)){ return '<a href="http://google.co.in" class="course_button full button">'.apply_filters('wplms_take_this_course_button_label',__('TAKE THIS COURSE','vibe'),$course_id).apply_filters('wplms_course_button_extra',$extra,$course_id).'</a>'; }else{ return $html; } } Change the http://google.co.in to your custom link
    #14899
    No One
    Spectator
    I think it will be fixed link for all courses, What to do if i have two or more different courses and i need to collect users in different google forms ? I think it will be great if it's possible to add an option in the course page to add a custom url like this post : https://wplms.io/support/knowledge-base/connect-take-this-course-button-to-external-page/
    #15326
    Anshuman Sahu
    Keymaster
    Try adding this code : You will have a field in the backend course settings in which you can give the link to the coming soon course button . add_filter('wplms_take_course_button','coming_soon_link',10,2); function coming_soon_link($html,$course_id){ $coming_soon = get_post_meta($course_id,'vibe_coming_soon',true); $link = get_post_meta($course_id,'vibe_link',true); if(vibe_validate($coming_soon) && !empty($link)){   return '<a href="'.$link.'" class="course_button full button">'.apply_filters('wplms_take_this_course_button_label',__('TAKE THIS COURSE','vibe'),$course_id).apply_filters('wplms_course_button_extra',$extra,$course_id).'</a>';   }else{   return $html;   }   }       add_filter('wplms_course_metabox','custom_fileds');   function custom_fileds($field1){            $prefix = 'vibe_';            $field1[]=array( // Text Input            'label' => __('Custom link on take this course button','vibe-customtypes'), // <label>            'desc'  => __('desc','vibe-customtypes'), // description            'id'    => $prefix.'link', // field id and name            'type'  => 'text' // type of field                                );            return $field1;                    }  
    #92998
    ateya3d
    Spectator
    i have something crazy in my website after using this code and remove it again all relative links not work and give me blank page after using this code every thing work good
    #93000
    ateya3d
    Spectator
    This reply has been marked as private.
    #93003
    ateya3d
    Spectator
    This reply has been marked as private.
    #93017
    H.K. Latiyan
    Participant
    @ateya3d: Please create your own topics for your issues. This code cannot do anything crazy in your website because this code only works if coming soon mode is enabled in your website and it simply gives a setting to change the take this course button link. Also make sure you resave the permalinks after adding or removing this code. --------------- If you are facing some issue related to this code, then please create your own topic and share the admin credentials with us to check this on your website.  
Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Coming Soon Button Custom link’ is closed to new replies.