• Hi there,

    is there anyway to change which category is selected as “parent” for a page if the page has multiple categories associated with it?

    Currently the category displayed is that one whose name comes first in alphabet. There doesn’t seem to exist any kind of hook to change this behavior in a childtheme as the generating functions do not trigger any relevant. I would be satisfied with either ordering the categories somehow or exclude specific ones as option to become a parent.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,
    I think there are no filters to achieve that as you already said, but you can always hack the core file, extending that class in your child-theme, or overwriting it (of course then you must be careful when upgrading the parent theme).
    https://github.com/Nikeo/customizr/blob/master/inc/parts/class-content-breadcrumb.php

    If you find a good solution I’m sure pull-requests will be very welcome ??

    Hi rjaeckel,

    I had more or less the same problem on my website. It’s a blog about my travels (in dutch).

    I wanted to add 2 levels of categories to my posts : level 1 with the kind of travel (tour, citytrip, walking, cycling,…) and level 2 with the destination (europe, africa, asia, north america, …)
    I also wanted the level 1 categories to display first in the breadcrums and meta information, followed by the level 2 categories.

    The only workaround I found was to put a dot (.) in the level 1 category names (.tour, .citytrip, …) so that they would always be alphabetically before the level 2 categories without the dots. I know it’s not particularly elegant, but it works.

    Greetz,

    Effevee

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change Category priority/order in breadcrumb’ is closed to new replies.