[Resolved] Custom Post Type Categories not showing in Category List
in our website http://ufm.wpx.me – when adding a new listing you would see a list of Categories but only those that were created normally, the categories that were created under the Custom Post Type does not show. Is there a way for us to somehow add a code into our theme to show the Custom Post Categories as well?
Ever figure this one out?
Not sure, if I’m understanding you, you create post type that also uses the category taxonomy. You create a new term from the menu page provided under the Custom Post Type menu. This term does not appear under the available categories when you go to add a new post under the default “post” post type?
If that is correct, I wasn’t able to recreate that with a CPT that went with the defaults under advanced options.
Thank you very much for your response.
This is our page for submitting listings – http://ufm.wpx.me/submit-listing/ . If you have an email I can send you temporary login so that you could see what we see on the category list.
This is what we have:
Normal Taxonnomy is called ‘Listing Categories’
inside Listing Categories we have (Business Listings, Resources)
We created a new taxonomy called ‘Business Location’ in CPT
inside Business Location we have (AUS, UK, US)
Now on this page – http://ufm.wpx.me/submit-listing we have a category list which only shows (Business Listings, Resources) – we also need the Business Location categories to show inside the category list. Do you have any idea how we can achieve this?
Ahh, it sounds like you have a case of 2 different taxonomies and your listings page is only showing one of them. What way are you using to display them on your submit listings page?
Exactly, so we need all categories to show. For the normal taxonomy it is being called by a php code. Now if we could maybe add another php code that will call the Custom Taxonomy to show on the list as well then maybe that will fix the problem.
I’d recommend using the pre_get_posts filter http://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts
This way you could check to see that you’re on the archive for the post categories of your choice, and add the second taxonomy to the query as well. May not be the most straightforward, but I wager you can find some tutorials on this topic somewhere. Hopefully that helps piece together a solution for you.
I was just wondering if you could give us some advice on how to setup our Custom Post Types UI because I went to a site that is using your plugin and when I type in the URL e.g. http://webcodesigner.com/bedrooms/2/ – it still shows the results but on our site when I type in e.g http://ufm.wpx.me/business_location/reading/ – it shows blog page.
What page do you have set for your blog page under Settings > Reading?
It’s fairly straightforward for use. Activate, go to the new menu item at the bottom of your admin menu list, and start saving options for the post type. Sometimes, you may need to flush your permalink rules, if you already have pretty permalinks enabled.
Nothing set for blog page. I’m using ‘Your Latest Posts’ option.
so in our website, we are using a wordpress Theme that already has a custom post type named “listing”, label is “Business Listings”. Under “Business Listings” you can add ‘Listing Categories’ and ‘Listing Tags’.
Now we installed CPT UI and created a new taxonomy under “listing” and we named it ‘business_location’ then we created new categories under this new taxonomy called ‘UK’. Everything is set, so I’m thinking if I type in http://ufm.wpx.me/business_location/uk I should be able to see the listings that are under ‘UK’ but instead I’m getting ‘Latest News’ – which is the only Post that we have created and its even uncategorized.
Did we do anything wrong in setting it up?
This is still a case of anywhere you’re trying to include the right post types, you’ll need to use a hook like pre_get_posts to change what will get queried for. As long as the taxonomies/post types you’re making are registering properly, then the plugin itself is working fine and this issue falls outside of its scope.
I love the plugin, really handy, just a quick question.
I have a custom taxonomy on my custom posts and they do not seem to show up by default when I view the post? There is a gap where they would normally be under the post title. Is this because I need to add something to my theme to get them, or is it a tick box in Custom UI?
Hope you can help.
- The topic ‘[Resolved] Custom Post Type Categories not showing in Category List’ is closed to new replies.