Is it possible to show more of "course excerpt" text on Courses page?

When I view my "courses" page on a computer web browser, the "course excerpt" text is cut off after just 1 line, but there is enough space in the DIV for 2 or 3 lines.

Is there a CSS tweak I could use to show a bit more of this text and use up some of that empty space?

  • calvinrogercanas

    Hi @Bryan Lamb,

    Thanks for your question.

    There are 2 ways you can add more characters for this.

    This is a better way. There's a shortcode for the excerpt that will let you manually set the length, you can find it in CoursPress > Settings > Shortcodes. (See this screenshot.)

    You'll use the shortcodes to build custom versions of your CoursePress pages. Think of the shortcodes as building blocks. You can match each piece of your current course list page to one of the shortcode elements.

    Here are the steps:
    1. Create a new page, this will be your course overview page.
    2. Using shortcodes, choose which elements you want to show, and any special attributes.

    To mimic the default look, just with a longer summary, you'd use a set of shortcodes like this:

    [course_title course_id="1" link="yes"]
    [course_thumbnail course_id="1"]
    [course_summary course_id="1" length="100"]
    [course_instructors course_id="1" style="list"]
    [course_description course_id="1"]
    [course_start course_id="1"]
    [course_end course_id="1"]

    You need to specify the course id.

    Second way, Editing the value of code in /wp-content/plugins/coursepress/includes/functions.php at line 1770. Change the value of $excerpt_length to something like 100 or your preferred value. Like this:

    $text = truncateHtml( $text, 100 );

    Any update of plugin and this customization will be gone - so I suggest you keep a backup of this file.

    Let me know if it helps! :slight_smile:

    Kind Regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.