Site logo

Archived topic

Hide Breadcrumbs

14 replies · Started by Sebastián on November 24, 2017

Viewing posts 1–15 of 15

Hi I put this code in the header.php file:

<?php
if ( function_exists('yoast_breadcrumb') ) {
yoast_breadcrumb('
<p id="breadcrumbs">','</p>
');
}
?>

And i enabled the breadcrumbs by Yoast.

But the only reason I want the breadcrumbs is for google searches.

Is there a way to hide the actual breadcrumbs from the pages? I don't want them to appear.
Just did it for Google Search.

Thanks

Hi there,

Try this:

<?php if ( function_exists('yoast_breadcrumb') && ! is_page() && ! is_home() ) : ?>
    <?php yoast_breadcrumb( '<p id="breadcrumbs">','</p>' ); ?>
<?php endif; ?>

So I need to put that code instead of the other one?

Yes

The breadcrumbs still appear on the blog page and blog posts.

And I already choose "hide on blog page" in the yoast advanced menu.

The condition I gave you is only to exclude pages?

If we hide on pages, main blog page, and posts, where is it supposed to show?

I would like to display breadcrumbs on the single blog posts down the featured images at the start of the posts. But not here: https://i.imgur.com/xDwxMb4.png

Thanks!

Breadcrumbs are working so everything is good but...

Why they are not displaying the blog category and how to do it? https://i.imgur.com/wbIlz3F.png

They are also not displaying the title of the web they are displaying the url

Looks like this: URL - Blog

But I want: Web Title (MMarketingOnline) - Blog - Category

Hope I made myself clear.

Thanks!

You’d have to check with where the breadcrumb code came from. GP hooks simply displays the content and does not alter the structure.

This archived topic is closed to new replies.