Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • The update still does not fix the issue entirely. It’s working fine for the single page but not on the archives page. This occurs when a category has a parent category.

    Home>Products>Fruits>Apple = single page
    Home>Fruits>Products = archive page

    To solve this I first tried adding:

    if ( count( $parents ) > 1 ) {
    		$parents = array_reverse( $parents );
    	}

    to the get_term_parents function inside class-breadcrumbs.php

    But this reverses the problem, now the archive page is displayed correctly but the single post page breadcrumb not.

    So I added an extra condition to the function so the code now looks like this:

    if ( count( $parents ) > 1 && is_archive()) {
    		$parents = array_reverse( $parents );
    	}

    This seems to fix it for me!

    Thread Starter Verzenden

    (@verzenden)

    (Sorry for the late reply, to many things going on at once)

    You’re so right! I should have used child themes, will dive into that. But you know, it is my first WP encounter, you dive into it, start changing things to your liking till you reach the point of no return by means of: “I don’t want to start all over again!”

    I had forgotten to assign the menu again. Damn that was easy, so close yet so far. Thx alot!

    <problem solved!>

Viewing 2 replies - 1 through 2 (of 2 total)