Archived topic
Breadcrumbs by Yoast
14 replies · Started by Garth Dryland on April 25, 2016
Hey Tom
I search the forum some time ago because I couldn't get the breadcrumbs to fill a footer container and found your php code on git for breadcrumbs by yoast hooks which sorted my problem and they were working great.
For some reason the right hand side of the breadcrumbs isn't reaching the right hand side of the container now. This was an issue i had initially so i went to git and copied the code again but it didn't fix the issue like it did initially when I used it.
I haven't made any substantial changes recently other than for SEO which is mostly content based.
I have however noticed that as soon as I click a page/post other than my home page the breadcrumb area look good and fits the full width of the container which is 1080 wide.
Any ideas ?
Can you link me to a page where it's not working as it should vs a page where it is working?
Hi Tom
I have emailed two samples. One being the homepage = this is the only page with an issue.
The welcome page is a sample of what all the other pages look like = all work as they should.
Garth
Hey Tom
I thought I would try disabling GP blog masonry and columns feature and that fixes the issue as far as the breadcrumbs width of 1080 is concerned however I do want to use the masonry feature.
It only seems to be affecting the footer hooks or the containers that are 1080 in width on my site.
Have you changed anything lately in these GP premium features because I could have sworn breadcrumbs were matching the container width for at least a month or so?
Garth
Interesting - haven't changed anything to do with that.
Can you link me to the page? I should be able to give you some CSS.
Hi Tom
I will email you the htaccess login and password to the staging site
Garth
Ah, give the element another class like this: <div class="page-header breadcrumb">
Then add this CSS:
.masonry-enabled .page-header.breadcrumb {
margin-right: 0;
}
Hi Tom
Awesome that worked.
I just added the new class breadcrumb to the existing page-header class as per your git code and applied the css and the problem was sorted.
Not sure how or when this issue occurred though I'm 99% sure it was a month after activating blog masonry.
Any idea what may have caused this issue so I can keep an eye on it in the future?
Cheers
Masonry changes the spacing of things, so if new elements are added that the plugin doesn't know about (the breadcrumbs), those elements need to be adjusted as well.
Glad it's working :)
Tom,
Wondering if you have plans to add BreadCrumbs feature in GP, or perhaps add an UI option to make GP work with Yoast SEO.
@Ramesh
GP has Yoast SEO Breadcrumb. You find it in appearance/customise and active from appearance/hooks however you will need the appropriate add-ons or premium plugin.
Garth,
I have GP Premium and I'm almost sure Yoast SEO didn't appear at first in the Customizer. I checked Yoast SEO Plugin options and breadcrumbs was disabled. I enabled it, and added the Github code and now it now appears.
Thanks for the pointer. That was helpful.
Awesome
Glad to hear it works.
I changed the line:
<?php if ( function_exists('yoast_breadcrumb') ) { ?>
to
<?php if ( function_exists( 'yoast_breadcrumb' ) && !is_home() && !is_front_page() )
So that it doesn't display breadcrumbs (the word "Home") in the homepage.
Ok. Tom has a better option (as always)
https://generatepress.com/forums/topic/hide-breadcrumbs-on-start-page-with-sections-but-show-categories-on-posts/
