WordPress.org

Ready to get started?Download WordPress

Forums

"the permalink" - how do I shorten / truncate / substr it before output (2 posts)

  1. mikker
    Member
    Posted 3 years ago #

    Hi.

    I have a real hard time shortening the_permalink.

    I know that the_permalink outputs straight away, but I've tried building a plugin to shorten it. I've also tried all kinds of substring tricks. But to no avail.

    What I want to do is grab the link to a story that is pulled via rss and shorten that link from:
    http://example.com/i-have-a-real-hard-time-shortening-the-bloody-permalink
    to:
    http://example.com/i-have-a-real-...
    or maybe even - if I get that far - to throw some code at it so it only outputs http://example.com

    Is it in anyway possible to grab it before it outputs or is there a way to grab it and write it to a custom field and then pull it from there?

    Thanks in advance.

  2. vbarrio
    Member
    Posted 3 years ago #

    I am also having this same issue - did you ever find a solution?

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic