Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author John Havlik

    (@mtekk)

    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

    (@shmk)

    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

    (@mtekk)

    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.