Archived topic
Breadcrumb
5 replies · Started by Afreen on June 18, 2021
Iam using rankmath and I would like to add breadcrumb to my website and they reply to use the shortcode and paste it on the functions.php file and I am worrying if use to paste it then GP updates will revert it, So If I use the child theme then how do I use this file, I am new to its steps?
Hi there,
simplest method is to add the shortcode using a Hook Element:
https://docs.generatepress.com/article/hooks-element-overview/
1. Create a new Hook in Appearance > Elements
2. add your shortcode in the text area,
3. select the hook for where you want it display in your posts - the doc above has a link to a visual guide of hooks positioning.
4. Set the Display Rules to the post / pages etc that you want it to be displayed.
Two last questions:
1. If I use the hook element as you mentioned and the coming updates of GP will not revert my setting, right?
2. I would like to position the breadcrumb below of my website hero, for example Breadcrumb Postion
1. Yes
2. Can you link me to the page in question?
Posted a link in private information.
Is this section added as a block page hero?
https://www.screencast.com/t/j0nUoFIg
If so you can add the breadcrumb using the generate_after_header hook with priority 15 then it should work.
Let me know :)