I currently have a ‘Post Object’ field called “artist” and I was wondering if it is possible to include it in both the title & permalink structure for a CPT.
The current permalink structure is www.website.com/%postname%/
but I need it to display as www.website.com/%artist%-%postname%/
.
I would also need the title of the post to include the “artist” field.. eg.(“Artist” – “Post Title”)
Hi @sbmdesigns
Just to clarify, you are trying to use a custom field value to modify the post_content and also the slug for the given post.
Can you please explain with more detail what the ‘artist’ post object field is?
What data from the artist do you want to load and inject into the current post’s title / slug?
Thanks
E
Hi @sbmdesigns
Sure, you can include all custom post fields (generated by ACF) in permalink URL plugin thanks to the plugin:
https://github.com/athlan/wordpress-custom-fields-permalink-plugin
You can also define custom fields on-the-fly like get the post permalink from specific field using hooks:
https://github.com/athlan/wordpress-custom-fields-permalink-plugin/wiki/ACF-plugin-support
Cheers,
Athlan