Does anyone know is it possible to only show the parent category on post page?
All of my posts are categorized under “Blog” as the parent category. I have also assigned numerous other posts to other categories under the parent of “Blog”.
In my navigation, when you click “Blog” it takes you to the category page for “Blog”. The breadcrumb works great here with it looking like so: Home > Blog.
Then when I select a post the breadcrumb changes to read: Home > Blog > Category 1 > Post Name.
Looking to see if all children of the category “Blog” can be removed from the breadcrumb.
Any help with this would be greatly appreciated.
I don’t know why you are using a category for “Blog”. With the advent of custom post types, custom taxonomies, and built in support for static front pages in WordPress, there is no reason to have a “Blog” category and overload the native blog post type.
If you were doing things the normal way (posts are blog posts, and you use WordPress’ “Page for Posts” option), achieving the desired result is really easy. You’d just uncheck the “POST_TYPE Taxonomy Display” option (where POST_TYPE is the post type) for your post type. It is that simple.
The main reason for doing it the way I am is that I have 2 types of blog post. Normal posts (for everyone) and Premium posts (restricted to subscribers). I also needed to URL’s set up in a particluar way. See the example below:
I am not too familar with custom taxonomies. I’m not sure how else to achieve the above other than using categories to assign my posts. I am up for a better, more efficient solution as I have been tearing my hair out to get to where I have. Any suggestions are very welcome.
I’ve actually just installed a plugin called “Custom Post Type UI”. Looks like this may be the answer.
I guess I use the posts just for the “normal posts” and create a custom post type for the “premium content”.
Where I get a little unstuck is how to display the “normal posts” and “premium posts” on the front end.
I have created a test site at: http://demo.duncanmorley.co.uk/
You can see from this link what I am experiencing with the URL’s & breadcrumbs. Very frustrating.
Please feel free to look at the admin to see if everything is set up correctly.
Take a look at it now. One issue you had was on your template for the premium posts page, you had
query_posts( 'post_type=premium');before the Breadcrumb NavXT calling code, which confuses it a little.
Do note that WP 3.1 is supposed to do the archive pages for us (I need to play around with this some more). The next version of Breadcrumb NavXT will support those properly (rather than forcing the user to use a root page for this, it will try to determine the auto-generated archive page for the type).
That’s awesome. Thanks for that. On a unrelated issue to the NavXT plugin, the custom post type for premium always prefixes the article URL with /premium/ which is what I want. The normal blog posts don’t. Any idea how to achieve this without changing the permalink structure to /blog/ in the wordpress settings (as this would get applied to the premium posts as well)?
- The topic ‘Breadcrumb NavXT plugin categories’ is closed to new replies.