Support » Fixing WordPress » Any way to shorten page title/links on pagination?

  • Resolved Agnes

    (@agneslesagegmailcom)


    Am I the only one to have a nice ‘next post title’ link get crumbled when it is too long?
    See here:
    http://www.morija.co.ls/the-mohlomi-memorial-lecture-series/

    I have the next_posts_link and previous_posts_link used on a pagination for both pages and posts. Looks good, but when the posts titles are too long, it gets terrible. I checked the codex and other posts and can’t find anyone to help how to shorten the links.
    I can use by CSS, buth then won’t get a ‘…’ at the end of a shortened title

    Any suggestion?

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi Agnes
    this plugin should solve your problem

    WordPress Plugin: Shorten Link Text

    Moderator Andrew Nevins

    (@anevins)

    Forum moderator

    You can use CSS and have the ‘…’
    use

    white-space: nowrap;
    width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;

    Play around with the width.

    Agnes

    (@agneslesagegmailcom)

    Thanks a lot for the suggestions!
    Robin, do you know of the plugin still works with newer versions? It seems pretty old and not in the plugin rpository…?
    Agnes

    This is from where he started off, someone had the same issue as u and so he ended up putting that thing into a plugin

    http://wordpress.org/support/topic/substr-still-echoing-whole-string-help?replies=8

    he has explained the function in the support thread so you can play it around with it

    Agnes

    (@agneslesagegmailcom)

    The plugin still works very fine 🙂
    Thanks a lot, Agnes

    cheers 🙂

    Agnes

    (@agneslesagegmailcom)

    Thanks Andrew:I had not realized the CSS works brilliatntly too!
    Agnes

    Agnes

    (@agneslesagegmailcom)

    Hello guys

    I implemented Andrews’ CSS stuff nicely here on the bottom pagination links (‘lookout…’)
    http://www.morija.co.ls/the-mohlomi-memorial-lecture-series/

    I tried to use the same to limit teh text displayed on mouseover iof a thumbnail here:
    http://www.morija.co.ls//museum/collections/historical-archives/
    But I don’t get the final ‘…’ there, I can’t figure out why…
    It is a CSS that appleis to a text (h2+excerpt)
    It has this:

    .items-list .item-thumbnail-text{/*ALP adding overflow */
    color:#666;
    padding: 5px 4px 4px 4px;
    display: block;
    width: 168px;
    height: 130px;
    line-height: 1.5em;
    text-overflow: ellipsis;
    overflow: hidden;
    }

    Any idea?

    Agnes

    (@agneslesagegmailcom)

    Andrew may I ask your help…

    Using the CSS method above to trim a title works fine for a A-line text, as the ellipsis works when the width is defined I believe.

    I am now trying to limit the space used by a comment in a list (I want to limit it to 2 lines), and I use a block with hidden overflow. However, I can’t get the ellipsis to show here…
    Any suggestion?

    Thanks a lot , Agnes

    #tf_tabs_2 div.comment-preview { /* ALP for FB comments*/
    display: block;
    line-height: 20px;
    height: 40px;
    text-overflow: ellipsis;
    overflow: hidden;
    }
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Any way to shorten page title/links on pagination?’ is closed to new replies.