Change Breadcrumb

#83949
  • Resolved flober
    Rank Math business

    I have this situation on a page with Rankmath, Breadcrumbs (Rankmath) and PWB for Woocommerce
    https://de.wordpress.org/plugins/perfect-woocommerce-brands/

    Home > Brands > Brandname

    Home = linked right
    Brands = not linked and i need another Word for this (Site is not in EN)
    Brandname = OK

    I need to change Brands name and link it to archive Page.

    How can i solve?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Alberto
    Rank Math business

    Hello,

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    That is something you can easily achieve by using our filters if you know about coding or if you hire a freelancer to do it for you. You should use this filter:

    /**
     * Allow changing or removing the Breadcrumb items
     *
     * @param array       $crumbs The crumbs array.
     * @param Breadcrumbs $this   Current breadcrumb object.
     */
    add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs, $class ) {
    	return $crumbs;
    }, 10, 2);

    Looking forward to helping you. Thank you.

    ​​​​​​​

    flober
    Rank Math business

    Here the solution. If in future you can integrate https://de.wordpress.org/plugins/perfect-woocommerce-brands/ with Rank Math, was great!

    add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs, $class ) {
    if (is_tax('pwb-brand')){
    $modifiedCrumb = array(
    				"0"=>esc_html('Brands'),
    				"1"=>esc_url('/brands/'),
    				"hide_in_scheme"=>false
    			);  
                    $crumbs[count($crumbs)-2] = $modifiedCrumb;
    }	
    	return $crumbs;
    }, 10, 2);
    • This reply was modified 4 years ago by flober.
    Michael Davis
    Rank Math pro

    Hello,

    Thank you for sharing.

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

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

The ticket ‘Change Breadcrumb’ is closed to new replies.