- This topic has 21 replies, 5 voices, and was last updated 2 years, 4 months ago by
patricia.
-
AuthorPosts
-
September 29, 2014 at 4:53 pm #35157
Mizanur
Hi Tom,
I am using breadcrumb by Yoast, as you have mentioned once here.All are ok, except, now the breadcrumb (Home » Blog) is showing on the top of each blog entry. A screenshot here.
I want only once, top of the page only. Possible?
Mizan
[Oh, would like to see GeneratePress has its own breadcrumb implementation!]September 30, 2014 at 9:36 am #35431Tom
Lead DeveloperLead DeveloperHi Mizan,
What hook are you adding the breadcrumb feature to?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentSeptember 30, 2014 at 10:50 am #35477Mizanur
I put the following code ‘Before Content’ hook.
<?php if ( function_exists(‘yoast_breadcrumb’) ) {
yoast_breadcrumb(‘<p id=”breadcrumbs”>’,'</p>’);
} ?>September 30, 2014 at 10:57 am #35479Tom
Lead DeveloperLead DeveloperBefore Content will show up before the content of everything – posts and pages (including excerpts).
You can add this in the “After Header” hook:
<div class="page-header grid-container grid-parent"> <?php if ( function_exists('yoast_breadcrumb') ) { yoast_breadcrumb('<p id="breadcrumbs">','</p>'); } ?> </div>
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentSeptember 30, 2014 at 11:25 am #35487Mizanur
If I put the code After Header hook the breadcrumb shows up all the way left.
My webpage LAYOUTt width is set to 1000px
It should be automatically aligned with layout length.I tried with your code but it is giving me some extra characters! yoast_breadcrumb was fine.
September 30, 2014 at 11:31 am #35491Tom
Lead DeveloperLead DeveloperThe piece of code that makes sure it won’t show up all the way to the left is this:
<div class="page-header grid-container grid-parent"> .... Yoast stuff in here </div>
Not sure how it would be giving you extra characters? Maybe the formatting was off.
Try taking the above, and then replacing the …. Yoast stuff in here with the code provided by WordPress SEO.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentSeptember 30, 2014 at 11:44 am #35495Mizanur
1) I put the following code in After Header Hooks:
<div class=”page-header grid-container grid-parent”>
<?php if ( function_exists(‘yoast_breadcrumb’) ) {
yoast_breadcrumb(‘<p id=”breadcrumbs”>’,'</p>’);
} ?>
</div>Result: I got breadcrumb all the way left and some ‘); } ?> characters
2) I put the following code in After Header Hook:
<?php if ( function_exists(‘yoast_breadcrumb’) ) {
yoast_breadcrumb(‘<p id=”breadcrumbs”>’,'</p>’);
} ?>Result: I got breadcrumb all the way left. No special characters shown.
Just wondering why the breadcrumb is not aligning with the Layout!
September 30, 2014 at 2:02 pm #35504Tom
Lead DeveloperLead DeveloperThe quotation marks in your above code are being formatted weirdly, which would cause the issues you’re explaining.
Try this: https://gist.github.com/generatepress/14b3e8a93175f11d9545
There’s no reason why that wouldn’t work.
Let me know.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentSeptember 30, 2014 at 3:01 pm #35508Mizanur
Hi Tom,
I used github code it seems like the characters are gone! Sreenshot of hook
But the alignment issue still persists. Bangladesh Circle
I think today is Tuesday, nothing works on Tuesday. 🙂
MizanSeptember 30, 2014 at 3:15 pm #35510Tom
Lead DeveloperLead DeveloperAh, my mistake (I blame Tuesday, too).
This should work: https://gist.github.com/generatepress/14b3e8a93175f11d9545
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentSeptember 30, 2014 at 3:29 pm #35512Mizanur
Yeap, the spell is broken! It works. 🙂
Thanks a million, Tom
MizanDecember 5, 2015 at 8:43 am #158196Alain León
After so many comments and errors have been very confused. Also my level of knowledge is very basic, please indicate below could what code to be inserted and where to properly activate the breadcrumbs?
December 5, 2015 at 9:36 am #158209Alain León
I think it would be good to have to install additional plug only if it can be inserted directly into the code, do not understand why you have not added that function to issue an update, like a button back to top
December 5, 2015 at 9:38 am #158210Tom
Lead DeveloperLead DeveloperHi there,
I agree! This is an option I’d like to add to an update in the future.
If you’re using the Yoast SEO plugin, they have a breadcrumbs feature. If you enable that feature, you can paste the above code (https://gist.github.com/generatepress/14b3e8a93175f11d9545) into the “After Header” hook in “GP Hooks”.
That will show the breadcrumbs.
Let me know if you need more info 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentDecember 5, 2015 at 11:04 am #158227Alain León
I enabled the feature in Breadcrumbs Yoast SEO Plugin and I inserted the code in After Header Hooks, and this is what shows me where the breadcrumbs should appear:
‘,’
‘); } ?> -
AuthorPosts
- The topic ‘Many breadcrumbs’ is closed to new replies.