Home › Forums › Legacy Support › Support queries › Other issues › Coming Soon Button Custom link
Tagged: Coming Soon
- This topic has 7 replies, 4 voices, and was last updated 7 years, 9 months ago by H.K. Latiyan.
Viewing 8 posts - 1 through 8 (of 8 total)
-
AuthorPosts
-
December 20, 2015 at 12:29 pm #14785No OneSpectatorI 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/ ThanksDecember 21, 2015 at 8:22 am #14878Anshuman SahuKeymasterPlease 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 linkDecember 21, 2015 at 9:34 am #14899No OneSpectatorI 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/December 23, 2015 at 12:18 pm #15326Anshuman SahuKeymasterTry 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; }February 1, 2017 at 1:48 am #92998ateya3dSpectatori 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 goodFebruary 1, 2017 at 1:57 am #93000ateya3dSpectatorThis reply has been marked as private.February 1, 2017 at 2:22 am #93003ateya3dSpectatorThis reply has been marked as private.February 1, 2017 at 5:43 am #93017H.K. LatiyanParticipant@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.
-
AuthorPosts
Viewing 8 posts - 1 through 8 (of 8 total)
- The topic ‘Coming Soon Button Custom link’ is closed to new replies.