Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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?

share|improve this answer
    
That was the problem thanks! –  javiervd Aug 10 '12 at 0:33
    
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 –  javiervd Aug 10 '12 at 12:13

Your Answer

 
discard

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

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