WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Yoast Breadcrumbs] Remove from homepage? (5 posts)

  1. billweb
    Member
    Posted 5 years ago #

    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.

  2. dave925
    Member
    Posted 5 years ago #

    I would like to know the answer to this too.

  3. Arieskingdom
    Member
    Posted 5 years ago #

    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.

  4. digikev
    Member
    Posted 5 years ago #

    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">','');
    	}
    } ?>
  5. imprintdesign
    Member
    Posted 5 years ago #

    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">','');
    	}
    } ?>

Topic Closed

This topic has been closed to new replies.

About this Topic