Support » Plugins » Excerpt length: Line limit?

  • Resolved MTPrower


    I have a child theme with a child functions.php.

    Is there a way to make the excerpt length x number of lines? I have a fluid site and I would like the excerpt length to stay at 5 lines at all times, so that no matter how wide or slim the site is, my style can look nice.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Never mind. I tricked my excerpts into being always the same height in a fluid layout with a combination of “height” and “overflow: hidden;”

    Thanks anyway.

    hey friend!

    can you please tell me how?

    i want my excerpt to constantly stay 2 lines

    much appreciate it if you can tell me the secret =)

    It requires some basic CSS coding. CSS is incredibly easy, and I think I have the right to make that statement, because I suck at coding in everything else.

    Basically, you give the excerpt box a max-height, and you give the excerpt text an overflow:hidden .

    If you need help, e-mail me at

    If you don’t know anything about CSS, I suggest you start by using the Firefox web browser and installing the Firebug plugin from the official Firefox plugins page. Then go to your blog and right-click anything on your blog and click “Inspect Element”. Take a good look at Firebug for a while, and screw around with the CSS code within the plugin so you can get an idea for how CSS works.

    You can then ask me for extra help if you want. Good luck!

    thanks mate,

    i already have firebug installed and know a bit about CSS.

    so you enclosed the excerpt box within a div?

    thanks for a quick reply =)

    Yes, you enclose it in a div. If you aren’t good with HTML, there is a plugin, I think called “Better Excerpt”, if I remember correctly, that would allow you to add code before and after the excerpt much more easily.

    You’ll have to adjust the excerpt height manually so you don’t clip any text, say, halfway. You may also have to find a creative way to end up with something that resembles a padding on the bottom, but that only depends on what the excerpt boxes look like.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Excerpt length: Line limit?’ is closed to new replies.