WP Tiles
[resolved] Custom Excerpt Length (5 posts)

  1. mbenari
    Posted 2 years ago #

    It seems like the excerpt length is determined by the width of the square (i.e. it shows 1 line of text). Is it possible to have a custom excerpt length. We need more text to appear.




  2. Mike Martel
    Plugin Author

    Posted 2 years ago #

    Hi Maya, you're right, the excerpt is cut off after a single line. However, the full WP excerpt is loaded (default 55 words) and you can use custom css to display it differently.

    For example, to simply show an extra line, you could use:

    .wp-tile-container .grid div.extra {
       height: 27px; /* Doubles the height of the line */
       white-space: initial; /* Overrules the no-wrap from wp-tiles styles */

    Be careful that you adapt the rest to fit in to this scheme though (for example, a two-line heading could overlap with the excerpt in the example above).

  3. mbenari
    Posted 2 years ago #

    Hi Mike, this is great! Is there any way to display the "..." after the excerpt or is this overruled with the new white-space rule?

  4. Mike Martel
    Plugin Author

    Posted 2 years ago #

    No, unfortunately that only works on a single line, unless you apply hacky techniques likes this one: https://www.mobify.com/blog/multiline-ellipsis-in-pure-css/

    One thing you could do is make your excerpt length quite small, so it's always be between one and two lines.. cutoff point won't sit so nicely at the end though.

  5. mbenari
    Posted 2 years ago #

    Thanks, I'll check it out.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Tiles
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.