Course loop php location

Home Forums Legacy Support Support queries How-to & Troubleshooting Course loop php location

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #208689
    a23
    Participant
    Hi, I wanted to edit the course loop inside directory, which php file should I be editing? I want to be able to add a few things inside each course loop
    #208691
    a23
    Participant
    Tried this https://wplms.io/support/knowledge-base/method-for-adding-custom-details-in-course-directory-page/ But after doing this we are getting error Site experiencing technical issue. We are currently using material theme
    #208814
    logan
    Member
    Hello, I dont know what have you done with the wplms core files. also you have not mentioned the error. i cant predict something with lack of informations. please share more details and let me know what you want to achieve with the course directory. the provided codes works only on course directory which is all-courses page.
    #212228
    a23
    Participant
    This reply has been marked as private.
    #212378
    logan
    Member
    use this filter in your customizer, we do not recommend to change or modify core files. use hooks to get your desired output. add_filter('bp_course_single_item_view',function ($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 $limit = apply_filters('excerpt_length',55); echo wp_trim_words(get_the_excerpt(), $limit); ?></div> <div class="item-credits"> <?php if(bp_is_my_profile()){ the_course_button($course_post_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; });        
    #212431
    a23
    Participant
    Fixed. Thanks!
    #212549
    logan
    Member

    Dear Friend,

    Glad you’re an issue is resolved.  🙂

    You could share your review about us. I would really appreciate that! Here: https://themeforest.net/item/wplms-learning-management-system/reviews/6780226

    If I can be of assistance, please do not hesitate to contact me again.

    Closing this topic.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Course loop php location’ is closed to new replies.