Support » Plugin: Yoast SEO » Breadcrumbs

  • Resolved bloggingbeats

    (@amitgargjind)


    Hey

    I am using this function to add breadcrumbs

    add_action( ‘generate_after_header’, function() {
    if ( function_exists(‘yoast_breadcrumb’) ) {
    yoast_breadcrumb( ‘<div class=”grid-container grid-parent”><p id=”breadcrumbs”>’,'</p></div>’ );
    }
    } );

    Issue: Showing Home on Homepage, how to remove it?

    Thanks

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Saša

    (@stodorovic)

    Probably is enough to add not is_home in the conditional. Something like this:

    add_action( 'generate_after_header', function() {
    	if ( ! is_home() && function_exists( 'yoast_breadcrumb' ) ) {
    		yoast_breadcrumb( '<div class="grid-container grid-parent"><p id="breadcrumbs">','</p></div>' );
    	}
    } );
    

    I didn’t test it, but it’s big chance that will work.

    PS: Please use backtick (`) to wrap the code.

    it is working
    Thanks a lot

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.