WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. mbenari
    Member
    Posted 1 year 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.

    Thanks,

    Maya

    http://wordpress.org/extend/plugins/wp-tiles/

  2. Mike
    Member
    Plugin Author

    Posted 1 year 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
    Member
    Posted 1 year 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
    Member
    Plugin Author

    Posted 1 year 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
    Member
    Posted 1 year ago #

    Thanks, I'll check it out.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.