Breadcrumb NavXT
Is it possible to exclude the parent category from the breadcrumb? (2 posts)

  1. pantone
    Posted 2 years ago #

    Let's say I have a food blog and there is a category called "Desserts". This "Desserts" category is a parent category and under this parent category are subcategories like "Ice Cream", "Cakes", and "Cupcakes".

    If I am on a blog post where the category for the post is "Ice Cream", the breadcrumb, by default, would appear like this:

    Homepage > Desserts > Ice Cream > Current Blog Post Title

    Is it possible to exclude the parent category "Desserts" so that the breadcrumb appears like this:

    Homepage > Ice Cream > Current Blog Post Title

    Thank you.


  2. John Havlik
    Plugin Author

    Posted 2 years ago #

    Well, fundamentally, you should be asking yourself why you want to have a hidden category (that's essentially what you are doing with the category Desserts). If you really mean that "Current Blog Post Title" is really a Dessert post type, you should consider using a Custom Post Type.

    Breadcrumb trails should not excluded breadcrumbs from the trail, it is a bad practice, just as having hidden categories is a bad practice. If you really want to do this, it is possible, you'll need to hook into the 'bcn_after_fill' action and remove the breadcrumb from the trail member of the bcn_breadcrumb_trail object that is passed into your hook handler.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Breadcrumb NavXT
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic