How to Edit/Add Custom Html for Single Item on Directory Page

Home Forums Legacy Support Support queries How-to & Troubleshooting How to Edit/Add Custom Html for Single Item on Directory Page

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #194660
    digikraft
    Participant
    I tried using https://wplms.io/support/knowledge-base/method-for-adding-custom-details-in-course-directory-page/ and it doesn't seem to be working anymore. I see that bp_course_item_view function is outputting the html but how can I add my own html markup? Thanks.
    #194862
    logan
    Member
    Hey there, Please paste this snippets in your wp-admin > plugins > editor > wplms-customizer plugin > wplms-customizer.php  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 ;   } use 2nd method there: https://wplms.io/support/knowledge-base/method-for-adding-custom-details-in-course-directory-page/
Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘How to Edit/Add Custom Html for Single Item on Directory Page’ is closed to new replies.