WordPress.org

Ready to get started?Download WordPress

Forums

Amount of text used in Excerpts (6 posts)

  1. kicker
    Member
    Posted 1 year ago #

    I have been using excerpts on the front page for some years without having to mess with it. Now I need to mess with it and can't find the where of that. I remember somewhere a box to say how many words to use in the front page excepts. Where was that? Or is it only in CSS somewhere?
    thanx
    kicker

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    There has never been a pane where you can configure the number of words in an excerpt in WordPress core.

  3. ModularBase
    Member
    Posted 1 year ago #

    You can't change the default character amount from the admin, but you can alter in the functions.php file: http://codex.wordpress.org/Function_Reference/the_excerpt

  4. kicker
    Member
    Posted 1 year ago #

    I followed directions and it doesn't work. Do I just paste it in anywhere in the functions.php file? Or find the same area and change things? Thanx kicker

    `Control Excerpt Length using Filters

    By default, excerpt length is set to 55 words. To change excerpt length to 20 words using excerpt_length filter, add the following code to functions.php file in your theme:

    function custom_excerpt_length( $length ) {
    return 20;
    }
    add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );

  5. ModularBase
    Member
    Posted 1 year ago #

    You shouldn't add to any part of your main theme.
    You should use a child theme: http://codex.wordpress.org/Child_Themes

    But, I think a simpler solution would be this plugin: http://wordpress.org/plugins/advanced-excerpt/

  6. kicker
    Member
    Posted 1 year ago #

    ModularBase! That plugin is the ticket!! Thanks A BUNCH.
    Kicker

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.