Home › Forums › Legacy Support › Support queries › How-to & Troubleshooting › Course loop php location
- This topic has 6 replies, 2 voices, and was last updated 4 years, 11 months ago by logan.
Viewing 7 posts - 1 through 7 (of 7 total)
-
AuthorPosts
-
May 11, 2019 at 6:43 am #208689a23ParticipantHi, 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 loopMay 11, 2019 at 6:57 am #208691a23ParticipantTried 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 themeMay 13, 2019 at 6:54 am #208814loganMemberHello, 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.June 4, 2019 at 3:26 pm #212228a23ParticipantThis reply has been marked as private.June 5, 2019 at 11:58 am #212378loganMemberuse 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; });June 5, 2019 at 4:31 pm #212431a23ParticipantFixed. Thanks!June 6, 2019 at 10:01 am #212549loganMember
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.
-
AuthorPosts
Viewing 7 posts - 1 through 7 (of 7 total)
- The topic ‘Course loop php location’ is closed to new replies.