WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
[resolved] Remove Breadcrumbs from Home page (8 posts)

  1. biskitwheels
    Member
    Posted 3 years ago #

    (using WP 3.0.2)

    How do I disable breadcrumbs from showing up on the home page?

  2. Jeff Sebring
    Member
    Posted 3 years ago #

    This is how I add it using manual mode. I add this to the theme functions file. The hook I use is theme specific, I use Thesis, but I'm sure your theme has a hook somewhere similar.

    // YOAST BREADCRUMBS
    function	yoast_crumbs()	{
    	if (is_single())	{
    		if ( function_exists('yoast_breadcrumb') ) {
    			yoast_breadcrumb('<p id="breadcrumbs">','</p>');
    		}
    	}
    }
    add_action('thesis_hook_before_headline', 'yoast_crumbs');
  3. mamouneyya
    Member
    Posted 3 years ago #

    Or you can put the if statement directly in the header, like I did. Open your header.php file, and change the default code you added somewhere:

    <div class="breadcrumbs">
    			<?php if ( function_exists( 'yoast_breadcrumb' ) )
    				yoast_breadcrumb( '<p id="breadcrumbs">', '</p>' );
    			?>
    		</div>

    to something like:

    <div class="breadcrumbs">
    			<?php if ( function_exists( 'yoast_breadcrumb' ) && !is_home() && !is_front_page() )
    				yoast_breadcrumb( '<p id="breadcrumbs">', '</p>' );
    			?>
    		</div>
  4. Joost de Valk
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks for sharing the solutions guys!

  5. biskitwheels
    Member
    Posted 3 years ago #

    what a gift to wake up to. thank you!

  6. jockpost
    Member
    Posted 3 years ago #

    Worked for me on Thesis. Just had to turn off the auto-insert in the plugin settings. Then I deployed it with jeffsebring's code.

    Thanks Jeff!

  7. simonsays452
    Member
    Posted 2 years ago #

    thanks so much.

  8. Michael Goitein
    Member
    Posted 2 years ago #

    I was using a child theme with the WooTheme's Delicious Theme - for me, it was even simpler.

    I just saved an instance of index.php as front-page.php, and then tracked down the code starting at around line 7:

    <?php if ( function_exists( 'yoast_breadcrumb' ) ) { yoast_breadcrumb( '<div id="breadcrumb"><p>', '</p></div>' ); } ?>

    I just deleted that code, uploaded the file, and "Presto!" - the unsightly breadcrumbs on the home page were gone.

    Yoast is normally super accurate with his code and usability, so I imagine it must have just been an oversight on his part.

    The fix (in the WooThemes framework, at least) is pretty simple.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic