We want to show Portfolio tag after Home in breadcrumbs

#195731
Viewing 1 replies (of 1 total)
  • Hello,

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

    We don’t have an option in the Rank Math settings that allows you to add this, but I created a simple code snippet and pasted it in your theme’s functions.php file that is achieving the desired result.

    Here’s the code snippet I added:

    
    add_filter( 'rank_math/frontend/breadcrumb/items', function( $crumbs, $class ) {
        if(is_singular('portfolio')){
            array_splice( $crumbs, 1, 0, array(array(
                "Portfolio",
                "https://www.rehahnphotographer.com/photography-portfolio/",
                "hide_in_schema" => false
            )) );
            }
        return $crumbs;
    }, 10, 2);
    

    Please verify on your end if this is the intended behavior or if you need to tweak this further.

    Looking forward to hearing back from you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘We want to show Portfolio tag after Home in breadcrumbs’ is closed to new replies.