0

I'm using a custom post type and a custom taxonomy to display a list of properties and its type in a page. It's working fine but for some reason some of my posts' taxonomies aren't getting saved correctly, for example I have 4 categories in my custom taxonomy: storage, home, apartment and other, if I check the home option and save my custom post it shows as storage in my page.

I did notice though that when I update my custom post to try to select the correct taxonomy term, after the page refreshes for a split second the incorrect taxonomy is marked as checked then it changes to the "correct" one even though it's not the one getting displayed in the page. It works fine for some posts I'm just having this problem in about 4 out of 20+ custom posts.

Here's how I've set up my custom post and taxonomy: http://pastebin.com/tN2q4QxV

In my single page I'm using wp_get_object_terms(get_the_ID(), 'type') to get the terms and loop trough them.

Thanks in advance

1 Answer 1

1

Maybe it has something to do with the name of your custom taxonomy. Type is a reserved term (see the complete list at the bottom of this page). Try changing the name and see if it works.

Also, did you flush the rewrite rules by going to Settings > Permalinks and click save?

1
  • As a follow up, is it possible that since a was using type for a while I may have messed up something in wordpress? I'm getting the same error sometimes using a new taxonomy name Aug 10, 2012 at 12:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.