• Hi,
    I have found this guide and follow it, just to discover (in some deep down post) that is is invalid for recent version 5 :(.

    So, I’d like to exclude one certain category from being displayed in breadcrumbs.
    I am not an expert in programming and I do not know the OOP, so I need simple instructions, please .
    It can be ugly and bad practice, as I want to exclude only one category – once and forever. I need it as simply put as possible.

    Additional problem for me is that I need some other links under categories that the link to category, but I’ll make separate ticket for this.

    Thank you very much for your answer,
    Maria

    https://wordpress.org/plugins/breadcrumb-navxt/

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

    (@mtekk)

    Is there a reason you can’t use a Custom Taxonomy for this? If you need that feature, use a Custom Taxonomy. It is the proper and officially supported way of having a ‘hidden’ tag/category.

    That said, it is possible to do this either using OOP as in the guide (same principles, just need to update with newer code), though this is not recommended. I will outline he recommended way of doing this, but anything more specific is an exercise left to the reader/developer.

    The recommended method is hooking into the bcn_after_fill action. The parameter passed into functions hooked into this action is a reference to the current instance of the bcn_breadcrumb_trail class. Within it you will find an array of breadcrumbs under the bcn_breadcrumb_trail::breadcrumbs member variable. Search that array for the breadcrumb you want to remove and use the appropriate PHP function for removing that entry from the array.

    Thread Starter maria.napiorkowska

    (@marianapiorkowska)

    Thanks for your answer. I hardly understood it (especially the latter part..).

    There’s no reason I am not using Custom Taxonomy. Only reason is my lack of knowledge – that’s why I am here.

    Once again I am not an expert (but a noob), I don’t know OOP.

    So, if Custom Taxonomies is THE SIMPLEST WAY to exclude certain category from breadcrumbs then this is exactly what I want to use!

    How can I do this? What’s a Custom Taxonomy? Is it a property of this plugin or is it WP core function? Can you point me in the right direction?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Exclude certain category from breadcrumbs’ is closed to new replies.