Hi @essbeeay!
Have you set “projects” to be a child page of either “scottys” or “scottys construction?” If so, can you please un-assign the parent page from “projects” and see if that resolves the duplication?
Let me know how you get on with that.
I said it must be a simple question.
Sorted.
Thanks so much!
You’re most welcome! I’m glad that helped.
I’ve had to come back to this, as I still have a problem here. My home page uses Goran’s GRID PAGE template. I want to display child pages on the homepage. This all works great.
http://www.100hands.org/scottys/
But, now any child page off the home page has a new directory that takes the site’s title (Scotty’s Construction) and gives me 2 home directories on my breadcrumbs. See it here:
http://www.100hands.org/scottys/scottys-construction/projects/
I don’t want to use Goran’s FRONT PAGE template for my home page, as I prefer the way the GRID template works.
Any ideas?
Thanks.
This custom CSS should remove one of the duplicate “Home” links:
.entry-breadcrumbs .home-link {
display: none;
}
Yep, that works. Just have to go through on a page-by-page basis and add the code.
Thank you!
You shouldn’t need to add this more than once, the CSS I gave you isn’t page-specific. Once you add it in your custom CSS editor it should apply to all pages where the breadcrumbs are active.
When I added it in site wide css I got no home link at all in the breadcrumbs. I will take another look though.
Thanks.
I looked again, and if I hide .home-link, pages which aren’t already a child-page of the home page will have no HOME link in the breadcrumbs.
So it is the second incidence of the HOME which I need to hide in breadcrumbs, which only happens on pages which are children or grandchildren to the home page.
So I can remove them with your CSS on each page.
Is there any other way to remove this problem?
Thanks.
The second instance of “Home” doesn’t have a unique class you can target with CSS to hide it, as you can see here:
<nav class="entry-breadcrumbs" itemscope itemtype="http://schema.org/BreadcrumbList">
<span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="http://www.100hands.org/scottys/" rel="home"><span itemprop="name">Home</span></a></span>
<span itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><a href="http://www.100hands.org/scottys/"><span itemprop="name">Home</span></a></span>
<span class="current-page" itemprop="itemListElement" itemscope itemtype="http://schema.org/ListItem"><span itemprop="name">Testimonials</span></span>
</nav>
One option is to hide all the breadcrumbs:
.entry-breadcrumbs {
display: none;
}
Another option is to hide the second item on all child pages, but I think that still targets too many pages:
.page-child nav.entry-breadcrumbs span:nth-child(2) {
display: none;
}
You might instead try targeting specific pages using their unique page ID. For example, this would hide the second breadcrumb item on all pages that have page ID 9 — http://www.100hands.org/scottys/ — as its parent, such as the Testimonials page:
.parent-pageid-9 .entry-breadcrumbs .home-link {
display: none;
}
Still another option is not to make pages children of the homepage.