Wordpress - PHP help

bannor11

Junior Member
Joined
Jan 1, 2012
Messages
157
Reaction score
31
Hi All,

I'm not familiar with PHP so I apologize if this is something really easy to do. I wasn't able to google exactly what I'm looking for so I'm hoping someone here can help!

I'm setting up a website using a /%postname%/ as the permalink structure.

I want to create lookup logic that can use a unique identifier and return the URL of the post with title.

e.g. mydomain.com/post-title to be returned from mydomain.com/returnpostusinguniqueidentifier.php?id=uniqueID

How can I achieve this? I imagine I would have to modify the php responsible for generating the post and be able to embed a uniqueID into it (based on the title), but after that how do I do the lookup in my example? Thanks in advance.
 
Why not use the post/page id that WP generates for you? These are already unique IDs.
 
I need my own pre-defined unique IDs. Would there be a huge performance impact for doing this lookup using a custom field?
 
Back
Top