Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
  • #439436

    I have a particular category that I use for organizing posts, but it’s more of a “hidden” category that is just for me (not for the public). Is there anyway for me to exclude this particular category from being shown in the breadcrumbs? Please advise. Thanks!


    Hi ACNLatitudes!

    Try adding this to the bottom of your functions.php file.

    add_filter( 'avia_breadcrumbs_trail', 'enfold_customization_breadcrumbs_remove', 2, 10 );
    function enfold_customization_breadcrumbs_remove( $trail, $args ) {
    	$i = 0;
    	foreach ($trail as $t) {
    		if (strpos($t, 'cat=9') != false) { unset($trail[$i]); }
    	return $trail;

    I had my permalinks set to default so I tested for cat=9 in each of the breadcrumb trails. You can replace cat=9 with the name of your category.

    It will also remove any other crumb that uses the same term though so you may want to change cat=9 to the URL of your category archive instead.

    Or if your category slug is “test” for example then do this.

    if (strpos($t, 'test') != false) { unset($trail[$i]); }


    • This reply was modified 4 years, 5 months ago by  Elliott.

    OK. Thanks, I’ll try that out!



    Alright. We’ll keep the thread open. Let us know if it works.

    Best regards,


    Hello. Thanks for providing this code. I will try it out and let you know if I have any issues.

    On a related note, will this code also prevent the category from being shown directly below the title of the post (the area where it shows all of the categories that are associated with the post? If not, is there some additional code that will be needed to hide the category from that area as well?




    Are you talking about in the single post view where it lists the post meta?

    Best regards,


    Hi Elliott,

    Thanks for the reply. I would effectively like to hide the specific category from showing up ANYWHERE in the theme (breadcrumbs, post meta, etc.). Please advise.




    Send us a link to your post and let us know which category it is.


    • This reply was modified 4 years, 3 months ago by  Elliott.

    Hi Elliot. OK. I have provided a few links that show the category on the post and have also provided the category name in the Private Content area. I also provided a temporary login if needed. Thanks!



    Try adding this to your custom CSS.

    a[href*="/category/evergreen/"] {
      display: none !important;



    That worked great. Thanks!



    Glad we could help :)

    Best regards,

Viewing 12 posts - 1 through 12 (of 12 total)

The topic ‘Hiding a Particular Category from Breadcrumbs’ is closed to new replies.