0

I have Custom Post Type "Places". In that I have Created Custom Fields. Like:

Option Title » Type of Pub
Option values » Sports, Rock, Biker, Beer, Live Band, Restro, Gastro, Irish, Karaoke Bar
Field Title » Type of Pub
Field name » typeofpub

What I want is to convert each title and values to tags. So that I should be able to click on them. And when I click on them it should go to the archive-tags.php and display all the posts with that option value.

  • 1
    If you want using taxonomy terms, why don't use terms instead of using custom fields and then convert to terms? – gmazzap Sep 6 '13 at 14:34
  • how can i do that – luckyrajiv Sep 6 '13 at 14:37
  • 1
    I mean register a custom taxonomy and use that instead of custom fileds. If you want to know ho register a custom taxonomy you need the function register_taxonomy – gmazzap Sep 6 '13 at 14:41
  • @G.M. Could change things to know if the OP is going to prevent that users can insert any of the terms "invalid"? I mean, with a metabox I could use default values ​​of the checkboxes to select which terms will become tags. – iEmanuele Sep 6 '13 at 14:59
  • 1
    @iEmanuele in that case is possible register a taxonomy with show_ui = false and create a metabox to let users select 'valid' terms (so terms created by admin). Only reason to implement this custom fields to terms conversion is if there are a lot of existing posts with already assigned fields and re-assign to taxonomy terms would be difficult. My first question to OP is for that reason. If he had aswered me "because I have a lot of posts with already assigned custom fields" probably I started an answer... – gmazzap Sep 6 '13 at 15:14

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.