Title: Course EXCERPT
Last modified: August 9, 2026

---

# Course EXCERPT

 *  Resolved [pwizard](https://wordpress.org/support/users/pwizard/)
 * (@pwizard)
 * [6 days, 3 hours ago](https://wordpress.org/support/topic/course-excerpt/)
 * Can you point me to how to increase the length of the excerpt for the course?
 * Thanks
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcourse-excerpt%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Support [brianvu-tp](https://wordpress.org/support/users/briantp/)
 * (@briantp)
 * [4 days, 19 hours ago](https://wordpress.org/support/topic/course-excerpt/#post-18990000)
 * Hi pwizard,
 * Thank you for reaching out to us!
 * You can easily adjust the maximum length of the course excerpt by adding a small
   PHP snippet to the functions.php file of your child theme, or via a code snippets
   plugin such as Code Snippets.
 * Here is the code you can use:
 *     ```wp-block-code
       add_filter(	'get_the_excerpt',	function ( $excerpt, $post = null ) {		$course_post_type = defined( 'LP_COURSE_CPT' ) ? LP_COURSE_CPT : 'lp_course';		if ( ! $post instanceof WP_Post || $course_post_type !== $post->post_type ) {			return $excerpt;		}		$max_chars = 5;		if ( mb_strlen( $excerpt ) <= $max_chars ) {			return $excerpt;		}		return mb_substr( $excerpt, 0, $max_chars ) . '...';	},	20,	2);
       ```
   
 * You can modify the value of **$max_chars** in the code above to match the exact
   character limit you want for your course excerpts.
 * Please give this a try and let us know if you need any further assistance!
 * Best regards,
   Brianvu-tp
 *  Thread Starter [pwizard](https://wordpress.org/support/users/pwizard/)
 * (@pwizard)
 * [4 days, 18 hours ago](https://wordpress.org/support/topic/course-excerpt/#post-18990018)
 * Thanks. Which number?
 * “That text is **137 characters**, including spaces and punctuation.”
   I want to
   up it to 160. I tried each number there but reduced rather than increased.
 *  Plugin Support [brianvu-tp](https://wordpress.org/support/users/briantp/)
 * (@briantp)
 * [4 days, 16 hours ago](https://wordpress.org/support/topic/course-excerpt/#post-18990066)
 * Hi pwizard,
 * Thanks for the update!
 * We think the text is still being cut off because LearnPress has a default CSS
   rule that limits the display of the course description to just two lines (using
   the line-clamp property).
 * Please follow these steps to resolve the issue:
 * Remove the PHP code snippet that we provided in our previous reply from your 
   functions.php file (or the Code Snippets plugin).
 * Go to your WordPress dashboard, navigate to **Appearance -> Customize -> Additional
   CSS** (or the custom CSS section of your current theme).
 * Paste the following CSS code:
 *     ```wp-block-code
       .learn-press-courses .course-content .course-short-description {-webkit-line-clamp: unset;}
       ```
   
 * Save the changes and reload your course page. We have tested this, though we 
   cannot rule out the possibility that the currently used theme is overriding this
   functionality.
 * This CSS code will remove the line limit.
 * Please let us know the result!
 * Best regards,
   Brianvu-tp
 *  Thread Starter [pwizard](https://wordpress.org/support/users/pwizard/)
 * (@pwizard)
 * [2 days, 17 hours ago](https://wordpress.org/support/topic/course-excerpt/#post-18992076)
 * No, that didn’t work at all.
   I should be able to overwrite because I have had
   good success doing just that. But this didn’t change anything
 * Vin
 *  Plugin Support [brianvu-tp](https://wordpress.org/support/users/briantp/)
 * (@briantp)
 * [1 day, 20 hours ago](https://wordpress.org/support/topic/course-excerpt/#post-18993089)
 * Hi Vin,
 * Thank you for updating us!
 * As this issue requires an in-depth technical investigation of your site, we need
   to handle it via our official support desk, where our team can properly inspect
   and resolve the problem.
 * Could you please create a support ticket on our official forum?
 * Please [visit](https://wordpress.org/plugins/learnpress/) our official helpdesk
   and click on the [“Support”](https://imgbb.com/FbC0zxS) and follow the instructions
   in [this video](https://drive.google.com/drive/folders/181y3d1VwuovxcElHvXTaPhQglQZPhgyK?usp=sharing)
   to create your ticket.
 * Enter the title ‘**pwizard – Course EXCERPT**‘ to help our team fast-track your
   request.
 * Once created, our support team will closely examine your setup and provide an
   exact solution for your site.
 * Thank you so much for your patience and cooperation!
 * Best regards,
   Brianvu-tp
 *  Thread Starter [pwizard](https://wordpress.org/support/users/pwizard/)
 * (@pwizard)
 * [1 day, 16 hours ago](https://wordpress.org/support/topic/course-excerpt/#post-18993167)
 * OK, thanks

Viewing 6 replies - 1 through 6 (of 6 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcourse-excerpt%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/learnpress/assets/icon-256x256.gif?rev=3254420)
 * [LearnPress - WordPress LMS Plugin for Create and Sell Online Courses](https://wordpress.org/plugins/learnpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/learnpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/learnpress/)
 * [Active Topics](https://wordpress.org/support/plugin/learnpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/learnpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/learnpress/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [pwizard](https://wordpress.org/support/users/pwizard/)
 * Last activity: [1 day, 16 hours ago](https://wordpress.org/support/topic/course-excerpt/#post-18993167)
 * Status: resolved