Yoast Breadcrumbs
Exclude categories from breadcrumbs (2 posts)

  1. kennybrewhouse
    Posted 4 years ago #

    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!


  2. kkzk
    Posted 3 years ago #

    Up !
    I have so far the same problem, for product categories using Woocommerce 2.0 + Yoast WordPress SEO (the breadcrumb plugin itself is deprecated).
    I have not figured out yet how Yoast "chooses" the categories to show in the breadcrumbs (the alphabetical order you mention, kennybrewhouse, seems to be a good path though ...)

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Yoast Breadcrumbs
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic