Exclude categories from breadcrumbs
-
I am trying to alter the yoast plugin to only display certain categories in the breadcrumb. For example, I am building a website for a community college. I have 7 “campus” categories set up and 10 other categories. I only want the campus categories to show up in the breadcrumb. Currently, if something is categorized as “Willow Creek Campus” and “Construction” Yoast displays “Construction” in the breadcrumb because the categories are being pulled into the crumbs in alphabetical order.
Another option that would work is finding a way to reorder the way the categories are pulled into the breadcrumb. If they were ordered by category id instead of alphabetically everything would be correct.
I’ve tried adding an array using ‘exclude’ to get_the_category on line 229 in the yoast-breadcrumbs.php file but no luck so far. Any help is appreciated. Thanks!
- The topic ‘Exclude categories from breadcrumbs’ is closed to new replies.