Complete course description in student course outline

Home Forums Legacy Support Support queries Update Issues Complete course description in student course outline

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #340117
    Baldamus
    Spectator
    Hi There, We have redesigned the course descriptions in Elementor. That all worked out well, too. The only unfortunate thing is that the full descriptions now show up in the student course outline. Screenshot: https://prnt.sc/zhs0ig How can I prevent this and display the normal view again?
    #340333
    Anshuman Sahu
    Keymaster
    please try adding this given code in your wplms-customizer.php file in wplms customizer plugin :
    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 the_excerpt(); ?></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;
    });
    #340850
    Baldamus
    Spectator
    Hi Alex, The code works, however it now deletes all text excerpts: https://prnt.sc/zvc4f3 Actually, it should look like this: https://prnt.sc/zvcb35 Currently, I have disabled the code on the site so that customers are better informed. However, I would like to design all course descriptions with Elementor in the future. Therefore, I would like to ask you to modify the code so that only the text excerpts are displayed as before.
    #340854
    Baldamus
    Spectator
    Hie Alex, Just to prevent misunderstandings: Only the text excerpts are to be displayed. Not the full course description. https://prnt.sc/zve6kp
    #341037
    Anshuman Sahu
    Keymaster
    Ok im sorry there was some mistake in code ,it is fixed now please copy now from above.
    #341044
    Baldamus
    Spectator
    Hi Alex, The new code works very well. Thank you for your support.
Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Complete course description in student course outline’ is closed to new replies.