WordPress.org

Ready to get started?Download WordPress

Forums

Permalink via Key? (2 posts)

  1. Valleriani
    Member
    Posted 7 years ago #

    Hello, I've been trying to get the permalink changed to a key in the database that I add when I add the post. For example, while posting I add a custom field; key of keylink(which never changes), and the value lets say being soccer. What I want is instead of it displaying:
    http://www.testsite.com/2007/05/02/nerd-humor/
    I'd like for it to become
    http://www.testsite.com/soccer

    The problem is, I do not know how to get the keys from the database so I can do a 'url' rewrite. Could anyone point me in the right direction or help me out? I understand how to do 'set' url rewrites, but for one that grabs the key from the mysql DB is a little more tricker, and difficult.

    I have read http://codex.wordpress.org/Function_Reference/WP_Rewrite and http://codex.wordpress.org/Introduction_to_Blogging#Pretty_Permalinks but I do not see anything involving grabbing a key from the DB and using that as a rewrite, different link. Maybe I've missed something in those pages, I'm not sure exactly.

    Thank you!

    P.S. I am using 2.1.3 :)

  2. Valleriani
    Member
    Posted 7 years ago #

    Just bumping up, I cannot figure it out still. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic