0

I'm looking to dynamically populate custom post type tags from multiple custom fields within the post type.

Is there an in build function / hook to enable this?

4
  • Can you explain more about your custom fields and your goal? Why do you need to duplicate information?
    – WebElaine
    Apr 12 '18 at 16:05
  • I'm creating a custom post type called 'music-video', which stores: 1. Song name 2. Artist name 3. Year of release I was hoping to store all of that information as tags to create a filter function when browsing the library of music videos. Apr 12 '18 at 17:53
  • You can check this wordpress.stackexchange.com/questions/62260/… Apr 12 '18 at 18:33
  • You don't need to copy the custom fields into Tags to be able to create a filter. And really, since meta queries are slow, you would do better to build a Taxonomy for artist name and another Taxonomy for year of release. Taxonomy queries will run much faster and not bog down your site, and again, there's no need to duplicate this information somewhere else. You can have your theme output and display it on single-music-video.php as well as use the info in filters on archives.
    – WebElaine
    Apr 12 '18 at 19:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.