Home › Forums › Legacy Support › 4.0 Bugs & Issues › Can we have read more button or link in course listing page?
- This topic has 11 replies, 3 voices, and was last updated 3 years, 1 month ago by Veronica.
Viewing 12 posts - 1 through 12 (of 12 total)
-
AuthorPosts
-
March 23, 2021 at 5:01 am #347874AdamSpectatorIn our site we have listing of all courses here: https://www.hublearn.com/hublearn-courses/ We are thinking to add read more button or link to each course boxes. Is it possible ? I can edit the course code if you can tell me which php file I need to edit, We are using child theme. I can override. But I am not sure which file from parent theme to copy into child theme. also few courses have video and when it clicks it pops up. Is it possible to disable it in course listing page only? https://prnt.sc/10t3qy6 We are using elementor course directory widget and course layout we choose is course 3. Or if you can tell me how to find that elementor course directory widget in wplms theme folder so that I can add read more button and disable video popup.March 25, 2021 at 1:11 pm #348458VeronicaModeratorhi for read more button we need to check the code will update you here tomorrow but please don't forget to ping us yes we can disable that with the help of custom code .page-id-2183 div#course_vid_popup { display:none }March 26, 2021 at 4:24 am #348582AdamSpectatorYes please update me for read more button, looking for the template.March 26, 2021 at 1:54 pm #348781VeronicaModeratorhi please try to use this
add_filter('wplms_course_thumb_extras',function($html){ return $html.'<a href="'.get_permalink().'">Read more</a>'});
March 26, 2021 at 2:20 pm #348796AdamSpectatorits showing error: Parse error: syntax error, unexpected '}', expecting ';' in /home/442517.cloudwaysapps.com/spcbwjwwds/public_html/wp-content/themes/wplmsblankchildhtheme/functions.php on line 156 My code:add_filter('wplms_course_thumb_extras',function($html){ return $html.'<a href="'.get_permalink().'">Read more</a>'});
March 27, 2021 at 7:22 am #348940AdamSpectatorThere is a semicolon missing, and the correct code:add_filter('wplms_course_thumb_extras',function($html){ return $html.'<div class="course-more"><a href="'.get_permalink().'">See more</a></div>';});
But now all course shows same url. Post ID is missing I think. see here: https://www.hublearn.com/hublearn-courses/March 27, 2021 at 11:50 am #349012Anshuman SahuKeymasterHi , yes this issue is apprearing right now . You need to follow this guide and register a custom featured block style : https://wplms.io/support/knowledge-base/creating-custom-featured-block-style/March 27, 2021 at 2:04 pm #349035AdamSpectatorThis is old code from 2015. We are not using anymore WPLMS Customizer plugin.March 27, 2021 at 5:04 pm #349047AdamSpectatorI can get this code and its working but there are few things missing. Instructor data, i.e. thumbnail of the profile, price, course rating, course number of user bp_course_get_course_credits shows all same price to all courses, so this is wrong. Whats the correct method to get the price of all courses?add_filter('vibe_featured_thumbnail_style', 'custom_vibe_featured_thumbnail_style',10,3); function custom_vibe_featured_thumbnail_style($thumbnail_html,$post,$style){ //if($style == 'custom_block'){ //Custom block is the same name as added for the thumbnail in pagebuilder $thumbnail_html =''; $thumbnail_html .= '<div class="block courseitem course3">'; $thumbnail_html .= '<div class="block_media">'; $thumbnail_html .= '<a href="'.get_permalink($post->ID).'">'.get_the_post_thumbnail($post->ID,'medium').'</a>'; $thumbnail_html .= '</div>'; $thumbnail_html .= '<div class="block_content">'; $thumbnail_html .= '<h4 class="block_title"><a href="'.get_permalink($post->ID).'" title="'.$post->post_title.'">'.$post->post_title.'</a></h4>'; $thumbnail_html .= '<div class="course_price">'.bp_course_get_course_credits().'</div>'; $thumbnail_html .= '</div>'; $thumbnail_html .= '<div class="course-more">'; $thumbnail_html .= '<a href="'.get_permalink($post->ID).'" title="'.$post->post_title.'">See more</a>'; $thumbnail_html .= '</div>'; //} return $thumbnail_html; }
March 30, 2021 at 1:42 pm #349448Anshuman SahuKeymasterYou can look over the "wp-content/plugins/wplms_plugin/includes/vibe-customtypes/includes/featured.php" file for the details code .March 30, 2021 at 3:28 pm #349477AdamSpectatorThank you. it helps. Please close it.March 31, 2021 at 7:51 am #349667VeronicaModeratorthanks for your confirmation topic closed -
AuthorPosts
Viewing 12 posts - 1 through 12 (of 12 total)
- The topic ‘Can we have read more button or link in course listing page?’ is closed to new replies.