#133585 Adjusting excerpt length not working in Posts element (Magazine theme)

Landing Forums JupiterX WordPress Theme Adjusting excerpt length not working in Posts element (Magazine theme)

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • Ryan Kline

    In the Posts element, adjusting the excerpt length is not having any effect. Also there is not an option to choose the end character (e.g. …) for this element (this option is there for some other posts elements). Any help appreciated.

    Amir Rather Support Team

    Hello There

    Kindly provide the Site or Login URL as well.

    Regards

    Private
    Ryan Kline
    This reply has been marked as private.
    Mohsin Al-Rabieai Support Team

    Hi Ryan,

    Once you fill the “Excerpt” field on each post, it will return all of it and actually overrides the except generation done by WordPress. All are happening in the get_the_excerpt() function which is the one that is being used in the Jupiter X Core posts widget. (Originally developed by WordPress). So, the option “excerpt length” will only work if you remove the excerpt from your posts. You can see it will work if you remove one from a post and test the option.

    The same applies to the “…” at the end of the excerpts. Once you fill the excerpt field, you can not see any “…” at the end. If it is generated automatically, you can add this using this filter to your child theme’s functions.php file:

    function custom_excerpt_more( $more ) {
        return '...'; // <-- your end string
    }
    add_filter( 'excerpt_more', 'custom_excerpt_more' );

    I added this to your child theme functions.php and it is working fine on the automatically generated excerpts.

    Best regards

Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.
Login