- This topic has 9 replies, 4 voices, and was last updated 4 years, 6 months ago by
David.
-
AuthorPosts
-
November 23, 2021 at 11:04 am #2018341
Sundry
Rankmath asked me to do the following:
Use the following code in your theme template files to display breadcrumbs. Learn More
<?php if (function_exists(‘rank_math_the_breadcrumbs’)) rank_math_the_breadcrumbs(); ?> OR [rank_math_breadcrumb]According to the guide video: https://youtu.be/30jgc9RXLVo the position is not clear.
Under Theme Editor where am I supposed to put the code? Please help.
November 23, 2021 at 12:00 pm #2018407Ying
StaffCustomer SupportHi there,
It depends on where you want the breadcrumbs to be placed?
Here’s a video from GP on how to add breadcrumbs: https://youtu.be/GkJq5fMwDxs
If you follow this video tutorial, the shortcode is what you are gonna use:
[rank_math_breadcrumb].Let me know if this helps 🙂
November 23, 2021 at 9:55 pm #2018974Sundry
Hello Ying,
I watched the video. On 1:25/4:59 where they are putting element type.
Unfortunately, I have no such option. As you can see in the attachments.
Please guide.
November 23, 2021 at 10:09 pm #2018982Elvin
StaffCustomer SupportHi there,
Under Theme Editor where am I supposed to put the code? Please help.
Do you have a child theme? If so, you can place this code on your child theme’s functions.php.
add_action( 'generate_before_entry_title', function(){ if ( function_exists('rank_math_the_breadcrumbs') ) { rank_math_the_breadcrumbs(); } });Alternative to functions.php, you can run this code on your site using a Code Snippets plugin.
https://docs.generatepress.com/article/adding-php/Unfortunately, I have no such option. As you can see in the attachments.
It’s not showing up because you’re using Classic editor for your site. The demo video is using WordPress’ latest default editor, Gutenberg.
November 23, 2021 at 11:37 pm #2019047Sundry
As per I can see it is not a child theme.
Can you please check and tell me?
Thank you. The breadcrumb is visible now. The size of the font is very big and quite absurd. Can we fix this?
November 23, 2021 at 11:47 pm #2019057Elvin
StaffCustomer SupportTry adding this CSS to adjust the font-size.
nav.rank-math-breadcrumb { font-size: 14px; }You can add this on
Appearance > Customize > Additional CSS.November 26, 2021 at 8:27 am #2024134Sundry
Thank you very much Elvin. As usual, you nailed it.
Can you please reduce the gap above the breadcrumb?
November 26, 2021 at 8:32 am #2024155David
StaffCustomer SupportHi there,
the space above the breadcrumb comes from the Customizer > Layout > Container –> Top Padding. You can reduce that there and it will keep the space uniform across the site.
November 26, 2021 at 1:04 pm #2024836Sundry
Thank you.
November 27, 2021 at 3:47 am #2025899David
StaffCustomer SupportYou’re welcome
-
AuthorPosts
- You must be logged in to reply to this topic.