Archived topic
Disable breadcrumb in homepage
5 replies · Started by Fulvio on June 9, 2017
Hi,
i installed the breadcrumb of yoast and i put the php string using the hook:
BEFORE CONTENT
i correctly can see the breadcrumbs in blog post and not in pages.
but i can see it in home page too.
Is strange because is visible only in the home page but not in all the other pages.
have you a solution to fix that?
thanks
Hi there,
Sounds like you only want the breadcrumb to show on single posts?
If so try wrapping the code with conditional tags: https://generatepress.com/forums/topic/can-gp-hooks-add-a-javascript-at-the-post-level/#post-329947
More info here: https://codex.wordpress.org/Conditional_Tags#A_Single_Post_Page
Let me know if this helps.
thanks as you suggest
this work fine:
<!-- breadcrumb by joast -->
<?php if ( is_single() ) { ?>
<?php
if ( function_exists('yoast_breadcrumb') ) {
yoast_breadcrumb('
<p id="breadcrumbs">','</p>
');
}
?>
<?php } ?>
<!-- fine breadcrumb by joast -->
You're welcome :)
Hi there,
I use yoast seo and installed breadcrumbs on my site you can see here tasty fitness recipes
i have put the following code "after header" on hooks
yoast_breadcrumb('<p id="breadcrumbs">','</p>');
} ?>
But the only problem i have is that I don't want breadcrumb to show on my home page
And one more thing actually i am new in this field of themes
so i am asking disabling the breadcrumb from home, will there be any seo impact.
Waiting for your reply
Can you open a new topic for your question and link me to your site?
This one is a bit old.
Thanks!