Home › Forums › Legacy Support › Support queries › Other issues › Course Block
- This topic has 4 replies, 3 voices, and was last updated 6 years ago by ajacks.
Viewing 5 posts - 1 through 5 (of 5 total)
-
AuthorPosts
-
May 12, 2018 at 4:22 am #156311ajacksParticipantHi, How do I achieve this? https://wplms.io/support/forums/topic/courses-page-all-courses-page-course-layout-change/ ThanksMay 12, 2018 at 9:22 am #156341Anshuman SahuKeymasterWell settings for this is not available for now . If you want to change it then you have to dig into code and use this filter : apply_filters('bp_course_single_item_view',0,$post); return 1 in this filter and before returning echo your html code . eg : add_filter('bp_course_single_item_view','custom_bp_course_single_item_view'); function custom_bp_course_single_item_view($x){ global $post; $course_post_id = $post->ID; $course_author= $post->post_author; $course_classes = apply_filters('bp_course_single_item','course_single_item course_id_'.$post->ID.' course_status_'.$post->post_status.' course_author_'.$post->post_author,get_the_ID()); ?> <li class="<?php echo $course_classes; ?>"> <div class="row"> <div class="col-md-4 col-sm-4"> <div class="item-avatar" data-id="<?php echo get_the_ID(); ?>"> <?php bp_course_avatar(); ?> </div> </div> <div class="col-md-8 col-sm-8"> <div class="item"> <div class="item-title"><?php bp_course_title(); if(get_post_status() != 'publish'){echo '<i> ( '.get_post_status().' ) </i>';} ?></div> <div class="item-meta"><?php bp_course_meta(); ?></div> <div class="item-desc"><?php bp_course_desc(); ?></div> <div class="item-credits"> <?php if(function_exists('bp_course_is_member') && function_exists('the_course_button') && is_user_logged_in() && bp_course_is_member(get_the_ID(),get_current_user_id())){ the_course_button(get_the_ID()); }else{ bp_course_credits(); } ?> </div> <?php $enable_instructor = apply_filters('wplms_display_instructor',true,$post->ID); if($enable_instructor){ ?> <div class="item-instructor"> <?php bp_course_instructor(array('instructor_id'=> $course_author)); ?> </div> <?php } ?> <div class="item-action"><?php bp_course_action() ?></div> <?php do_action( 'bp_directory_course_item' ); ?> </div> </div> </div> </li> <?php return 1 ; }May 17, 2018 at 1:49 pm #157222ajacksParticipantHi Alex, Thanks, but I just noticed that the course block appears in different formats everywhere... homepage is different, related courses is different and in course directory (grid view) is different)... like this is odd... why 3 different views for one platform? is some setting messed up on my platform? can you guide - it should be the same format across all course blocks thanksMay 18, 2018 at 12:15 pm #157364Anshuman SahuKeymasterHi, The format of these blocks are generally different. You can change the format. For suggested course you can change layout in course manager. Go to wp-admin>wplms>course manager> Refer : http://prntscr.com/jjhvt3 For home page, you need to edit home page and change course block. Refer : http://prntscr.com/jji105May 19, 2018 at 5:28 am #157470ajacksParticipantok thanks! please close the topic thanks
-
AuthorPosts
Viewing 5 posts - 1 through 5 (of 5 total)
- The topic ‘Course Block’ is closed to new replies.