Can we have read more button or link in course listing page?

Home Forums Legacy Support 4.0 Bugs & Issues Can we have read more button or link in course listing page?

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #347874
    Adam
    Spectator
    In 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.
    #348458
    Veronica
    Moderator
    hi 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 }
    #348582
    Adam
    Spectator
    Yes please update me for read more button, looking for the template.
    #348781
    Veronica
    Moderator
    hi please try to use this add_filter('wplms_course_thumb_extras',function($html){ return $html.'<a href="'.get_permalink().'">Read more</a>'});
    #348796
    Adam
    Spectator
    its 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>'});
    #348940
    Adam
    Spectator
    There 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/
    #349012
    Anshuman Sahu
    Keymaster
    Hi , 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/
    #349035
    Adam
    Spectator
    This is old code from 2015. We are not using anymore WPLMS Customizer plugin.
    #349047
    Adam
    Spectator
    I 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;
    }
    #349448
    Anshuman Sahu
    Keymaster
    You can look over the "wp-content/plugins/wplms_plugin/includes/vibe-customtypes/includes/featured.php" file for the details code .
    #349477
    Adam
    Spectator
    Thank you. it helps. Please close it.
    #349667
    Veronica
    Moderator
    thanks for your confirmation topic closed
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.