WordPress.org

Ready to get started?Download WordPress

Forums

Excerpt Problem (5 posts)

  1. kennyfellows
    Member
    Posted 1 year ago #

    I am having difficulty with post excerpts. I am using the "Denitto" theme, which is originally a two column, blog-style, theme. However, I edited the code to make it only one column, and I suspect that may be what is causing my problems.

    Long story short, if I increase the size of the "post box", the amount of words that show up in the excerpt do not increase to fill up the extra space. If I decrease the size, the "continue reading" link disappears.

    I am using a child theme for all of my edits. I have tried a few excerpt plugins, as well as inserting a break in my post, but none seem to have any effect.

    I would like to be able to increase the size of the excerpt that shows on the front page. Any help is greatly appreciated. Thanks!

  2. kennyfellows
    Member
    Posted 1 year ago #

    Whoops... forgot to mention that my website is http://www.bettermanproject.com

  3. Don Betts
    Member
    Posted 1 year ago #

    I've used this on a site where I wanted a different excerpt length on the homepage. Put it in your functions.php file:

    function new_excerpt_length($length) {
    	if (is_home()){
    	  return 85;
    	}
    	else {
    	  return 40;
    	}
    }
    add_filter('excerpt_length', 'new_excerpt_length');

    Play with the two numbers until you get the right length for the home page- the first number is what will show on the home page, the second number is what will show for the excerpt anywhere else.

    Good luck!

  4. kennyfellows
    Member
    Posted 1 year ago #

    Thanks for the quick response. I tried adding this to my functions.php file, but it didn't have any effect. Any other potential solutions?

  5. kennyfellows
    Member
    Posted 1 year ago #

    Nevermind! I've got it figured out. I didn't realize there was a page called post.php that controlled the excerpt length. All set! Thanks for your help!

Topic Closed

This topic has been closed to new replies.

About this Topic