- This topic has 17 replies, 3 voices, and was last updated 1 year ago by
Leo.
-
AuthorPosts
-
March 17, 2020 at 2:14 am #1197038
Ravi Dixit
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.
March 17, 2020 at 4:16 am #1197146David
StaffCustomer SupportHi there,
they provide this PHP snippet:
<?php if (function_exists('rank_math_the_breadcrumbs')) rank_math_the_breadcrumbs(); ?>
You can add it to the site using a hook element:
https://docs.generatepress.com/article/hooks-element-overview/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/March 17, 2020 at 5:03 am #1197185Ravi Dixit
Hey, David!
I have added it but it isn’t working, see here https://prnt.sc/rhry6b
March 17, 2020 at 5:30 am #1197200David
StaffCustomer SupportYou 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 ).
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/March 17, 2020 at 5:54 am #1197218Ravi Dixit
I have enabled the Execute PHP and set the display rule to all posts as you said.
But it is still not working.
March 17, 2020 at 6:09 am #1197229David
StaffCustomer SupportAfter 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.Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/March 23, 2020 at 8:28 am #1207631Ravi Dixit
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
March 23, 2020 at 8:56 am #1207678David
StaffCustomer SupportThe issue will be related to the RankMath plugin or most likely how it is set up – are they enabled ?
https://rankmath.com/kb/general-settings/#bread-crumbs
If it is then you would need to look at the other settings or speak with RankMath support.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/March 23, 2020 at 9:00 am #1207681Ravi Dixit
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 DixitMarch 23, 2020 at 10:27 am #1207741Leo
StaffCustomer SupportCan you disable your caching plugin first?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/March 23, 2020 at 10:45 am #1207760Ravi Dixit
Why do I need to disable the cache plugin?
March 23, 2020 at 10:53 am #1207763Leo
StaffCustomer SupportSo I can see what’s been added by you already or it’s coming from the plugin itself.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/March 23, 2020 at 10:55 am #1207765Ravi Dixit
Can you share the CSS for making breadcrumbs like this… https://prnt.sc/rlcbc2
March 23, 2020 at 10:57 am #1207770Leo
StaffCustomer SupportDid 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; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/March 23, 2020 at 11:09 am #1207780Ravi Dixit
No, I added it myself.
-
AuthorPosts
- You must be logged in to reply to this topic.