Title: Conditional breadcrumbs
Last modified: August 31, 2016

---

# Conditional breadcrumbs

 *  Resolved [ShMk](https://wordpress.org/support/users/shmk/)
 * (@shmk)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/conditional-breadcrumbs/)
 * Hello,
    are there any action/filter that I can attach in a custom function to
   choose if include or not the breadcrumbs?
 * Thanks
 * [https://wordpress.org/plugins/breadcrumb-navxt/](https://wordpress.org/plugins/breadcrumb-navxt/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [John Havlik](https://wordpress.org/support/users/mtekk/)
 * (@mtekk)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/conditional-breadcrumbs/#post-7114616)
 * As in whether or not to display the breadcrumb trail at all? Or individual breadcrumbs?
   For the former, just wrap the call to `bcn_display()` with your control logic.
   For the latter, look at the `bcn_after_fill` action to adjust what is in the 
   breadcrumb trail.
 *  Thread Starter [ShMk](https://wordpress.org/support/users/shmk/)
 * (@shmk)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/conditional-breadcrumbs/#post-7114642)
 * I’m looking to “not display the breadcrumb at all”.
    To wrap the call to `bcn_display()`
   I’ll have to edit theme files, is it possible to have the same result from a 
   plugin? (that’s way I was looking for a hook to attach ;))
 *  Plugin Author [John Havlik](https://wordpress.org/support/users/mtekk/)
 * (@mtekk)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/conditional-breadcrumbs/#post-7114695)
 * Technically, you could use the `bcn_after_fill` action and have your hooked function
   clear the breadcrumbs member array of the passed in `bcn_breadcrumb_trail` object
   instance.
 * Note that the above solution is kind of a hack. It is preferable that `bcn_display()`
   is not called when the trail is not desired. If your theme doesn’t facilitate
   that without modification, then that’s on the theme. Note that you could create
   a child theme with the modified calling code. This has the advantage of letting
   you do what you want, while being able to update the base/parent theme as updates
   are made available.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Conditional breadcrumbs’ is closed to new replies.

 * ![](https://ps.w.org/breadcrumb-navxt/assets/icon.svg?rev=1927103)
 * [Breadcrumb NavXT](https://wordpress.org/plugins/breadcrumb-navxt/)
 * [Support Threads](https://wordpress.org/support/plugin/breadcrumb-navxt/)
 * [Active Topics](https://wordpress.org/support/plugin/breadcrumb-navxt/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/breadcrumb-navxt/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/breadcrumb-navxt/reviews/)

## Tags

 * [display](https://wordpress.org/support/topic-tag/display/)
 * [hide](https://wordpress.org/support/topic-tag/hide/)
 * [hook](https://wordpress.org/support/topic-tag/hook/)

 * 3 replies
 * 2 participants
 * Last reply from: [John Havlik](https://wordpress.org/support/users/mtekk/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/conditional-breadcrumbs/#post-7114695)
 * Status: resolved