WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Yoast Breadcrumbs] Remove from homepage?

[Plugin: Yoast Breadcrumbs] Remove from homepage?

  • Is it possible to remove the breadcrumb from the home page, but leave it on all other posts/pages/etc?

    Do not want breadcrumb’s Home on the home page.

Viewing 4 replies - 1 through 4 (of 4 total)
  • I would like to know the answer to this too.

    In yoast-breadcrumbs.php on line 193:

    if ( ($on_front == "page" && is_front_page()) || ($on_front == "posts" && is_home()) ) {
    $output = bold_or_not($opt['home']);

    Change that output to

    $output = '';

    Thats what I did, worked a treat.

    Arieskingdom wrote:
    In yoast-breadcrumbs.php on line 193:

    if ( ($on_front == "page" && is_front_page()) || ($on_front == "posts" && is_home()) ) {
    $output = bold_or_not($opt['home']);

    Change that output to

    $output = ”;

    Thats what I did, worked a treat.

    This will still leave you with the text “You are here:”

    It is far simpler to adjust the code that you add into your header.php so it reads:

    <?php if (is_home()) {
    	echo '';
    } else {
    	if ( function_exists('yoast_breadcrumb') ) {
    		yoast_breadcrumb('<p id="breadcrumbs">','');
    	}
    } ?>

    digikev wrote:
    It is far simpler to adjust the code that you add into your header.php so it reads:

    <?php if (is_home()) {
    	echo '';
    } else {
    	if ( function_exists('yoast_breadcrumb') ) {
    		yoast_breadcrumb('<p id="breadcrumbs">','');
    	}
    } ?>

    I found that I needed to change the word home — see above example — to front_page because in WP 2.8.2 I have the FRONT PAGE DISPLAYS option set to “A static page” which I then set and WP “turns into” a call for “front_page”. It worked great after I made that one change.

    Also, I placed the breadcrumbs in my index.php – you may need to look elsewhere (other than header.php) if your breadcrumbs are not in that file.

    I used:

    <?php if (is_front_page()) {
    	echo '';
    } else {
    	if ( function_exists('yoast_breadcrumb') ) {
    		yoast_breadcrumb('<p id="breadcrumbs">','');
    	}
    } ?>

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Yoast Breadcrumbs] Remove from homepage?’ is closed to new replies.
Skip to toolbar