Breadcrumb using a wordpress menu option?

#30440
  • Resolved Ralf Reymann
    Rank Math pro

    It would be nice to have a possible to use one or more WordPress Menu for Breadcrumb.

    I use a mix of pages and posts, so it is important for me too manually generate Breadcrumbs paths as it makes sence for our reader – e.g. Start > Page 5 > categorie > Post 20

    Using Breadcrumb at Rank match is generates by categorie, tags … But it can not mix pages and posts.

    At the moment I use the very old plugin WP Nav Menu Breadcrumbs ( https://codecanyon.net/item/wp-nav-menu-breadcrumbs/4706192 ). You see a chance to integrate suche a function too – maybe in a paid premium version of the plugin?

    • This topic was modified 4 years, 8 months ago by Ralf Reymann.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

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

    It is currently possible to modify the breadcrumb HTML and $crumbs by using the following filters:

    /**
     * Filter to change breadcrumb html.
     *
     * @param  html  $html Breadcrumb html.
     * @param  array $crumbs Breadcrumb items
     * @param  class $class Breadcrumb class
     * @return html  $html.
     */
    add_filter( 'rank_math/frontend/breadcrumb/html', function( $html, $crumbs, $class ) {
    	// theme_breadcrumb_function();
    	return $html;
    }, 10, 3);
    
    //Remove breadcrumb items
    /**
     * 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.

    ​​​​​​​

    I dont understand how to use it. So is it possible to add a extra tag in the breadcrumb e.g. a page in front of an category)?

    Hi Ralf,

    Thanks for the follow up.

    Yes it should be possible to add the page in front of the category. I can recommend that you reach out to a freelancer so that they can help to customize the arguments for this filter.

    I hope this info helps. Thank 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 3 replies - 1 through 3 (of 3 total)

The ticket ‘Breadcrumb using a wordpress menu option?’ is closed to new replies.