Forum Replies Created

Viewing 2 replies - 61 through 62 (of 62 total)
  • Thread Starter Nico(las) Messer

    (@aquadonis)

    The Plugin can be found here:
    https://yoast.com/wordpress/breadcrumbs/

    Simply follow the instruction on the site and all should work fine.

    What I’m about to show you won’t remove the word “Home” from the Breadcrumbs navigation but completly hide it on the “home” page.

    I’m using it as part of my navigation and want it to have on every site, I decided to put it in the header as I call this file everywhere on my blog. But the fact that on my “home” page the out put was “Home – name of the first post” annoyed me and I wanted it gone. So two solutions I found.

    1. Take the code out of the header and put it only in the files where I want the breadcrumbs to show up.
    2. Leave it in the header but don’t make it show if it’s on “home”.

    Problem with #1, you have to put that code in a lot of files if you’re using all the different page templates.

    “Problem” with #2, how do you know you’re on the “home” page.

    So here’s my code and CSS mark-up.

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

    This checking the “home” page and if true attributes a special class to it.

    #breadcrumbs-home {
    	visibility: hidden;
    	}

    This is hiding the Breadcrumbs on the “home” page.

    Hope this works for you.

    P.S.: you can’t see it working on my blog yet, as I’m not yet using the new design.

    Thread Starter Nico(las) Messer

    (@aquadonis)

    Figured out a way of doing this without changing anything of the Plugin. Just put it in a div and use the is_home function, add a specific class to it and hide it when true.

Viewing 2 replies - 61 through 62 (of 62 total)