Tell me more ×
WordPress Answers is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I am using /%category%/%postname%/ permalinks.

Within two custom post types (and only those two), I need to append that URL structure with a third variable which will be from a custom field (provided by ACF). This would happend the first time the post is saved.

So it would be /%category%/%postname%-%custom-field%

This custom field would need to be sanitized, so that it is all lower case with dashes instead of spaces.

Thanks in advance!

share|improve this question
this is going to be tricky. for incoming requests for these posts, how will WordPress know what is just a postname, or where the postname ends and the custom field value begins? – Milo Mar 12 at 0:47
Hi Milo, thanks for the reponse, sorry it's taken me so long to get back... I was imagining that some php code could save the modified url the first time and then it would be in the database as the modified url. Just as if the user had manually set the url him/herself. it would be set on save and then remain the same. Is that not possible? – Jacob Mar 18 at 20:36

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.