This topic contains 1 reply, has 2 voices, and was last updated by  Skandha 8 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #131638

    Ann84
    Participant

    Is there a possibility to change the excerpt length to characters (including spaces) instead of words?

    #131671

    Skandha
    Participant

    @ann84: You will need to create a child theme for this and add the following code to your child theme’s functions.php file. You can check out the link above if you don’t know how to create a child theme

    function custom_short_excerpt($excerpt){
    	return substr($excerpt, 0, 200);
    }
    add_filter('the_excerpt', 'custom_short_excerpt');

    Let me know if this solves your issue!

    Regards,
    Skandha

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Excerpt options’ is closed to new replies.