How are you setting the primary category (what plugin are you using to add that functionality)? This is not a concept that is part of WordPress core. Support for primary categories is available through the Breadcrumb NavXT Paths extension plugin. Note that Order Bender (another plugin) does this as well, but only works with the metabox that it adds for primary category selection.
Hey John,
its the normal “primary”-function of WordPress – look: https://ibb.co/eZasJb
I cant say something more than that. It should be fixed by the plugin itself or not?
Yours sincerly
Thanks for the screenshot. I’m pretty sure that is Yoast SEO, or some other plugin, adding the primary category setting. That is not something that WordPress without any other code/plugins will do. Support for primary categories added by Yoast SEO is available through the Breadcrumb NavXT Paths extension plugin.
Ok, thank you for the reply.
Am I sure if I have two categories and no one is primary then Breadcrumb NavXT will select one of the two as the one which are display as breadcrumb automatically?
And if I want to control this which category should display I have to purchase the plugin? :/
When a post (of any post type) is a member of multiple terms from the taxonomy that is set as the hierarchy to follow (in the Breadcrumb NavXT settings) for that post type, Breadcrumb NavXT will pick the first term that has a parent (for hierarchical taxonomies). Otherwise, it will end up selecting the last term returned by get_the_terms().
If you want to control which term Breadcrumb NavXT selects (modify the above behavior), there are several options. You can:
- Use Breadcrumb NavXT Paths (premium)
- Use Order Bender (free)
- Write custom code that interacts with the
bcn_pick_post_term filter
Thank you!
With Order Bender it works :))