Site logo

Archived topic

How I can add breadcrumbs in my blog?

17 replies · Started by Ravi Dixit on March 17, 2020

Viewing posts 1–15 of 18

Hello, GeneratePress team!

I am using RankMath SEO and want to add the breadcrumbs on my blog.

I have read many posts and topics but couldn't find any good solution.

Please help me in adding breadcrumbs.

You need to enable to Execute PHP in the hook element, and make sure to set the Display Rules to Posts > All Posts ( or wherever you need it ).

I have enabled the Execute PHP and set the display rule to all posts as you said.

But it is still not working.

After the Breadcrumb code add:

<span>I am a test</span>

If you do not see I am a test this on the Post then you need to check:

1. The Hook being used is correct - see visual guide of hooks here:
https://docs.generatepress.com/article/hooks-visual-guide/

2. The Display Rules are correct eg. Posts > All Posts

If you do see the I am a test then we know the hook is working.
Which means the Rank Math function is not. As the first part of the function is checking that it exists - then its absence would be related to the Plugin settings.

Hey, David!

I have tried adding "I am a text" and I can see it on the post.

Please help me.

I think RankMath Code isn't working

I am really sorry...

It was not enabled... Now it is working fine.

Can you share some CSS for styling the Breadcump section?

Like this one, https://prnt.sc/rlcbc2.

And also, It is talking two lines to show on mobile. But I want to show it a single line.

Thanks,
Ravi Dixit

Can you disable your caching plugin first?

Why do I need to disable the cache plugin?

So I can see what's been added by you already or it's coming from the plugin itself.

Did you add this CSS or it's coming from the plugin?

.rank-math-breadcrumb {
    background-color: #E4E2DD;
    padding-top: 5px;
    padding-bottom: px;
    padding-left: 10px;
}

No, I added it myself.

This archived topic is closed to new replies.