Archived topic
Breadcrumbs Setup
10 replies · Started by Sourabh on December 13, 2020
Hi,
how to activate Breadcrumbs in GP, I have rank math pro and it's having options also but its asking to add a line of code in child.php, yesterday I did it, and the site is broken down, so afraid now.
How to do it via GP ??
Hi there,
What was the code you added? What was the error?
Let us know :)
I don't remember because after adding that code site was broken so just restored today.
Didn't get any error but site broken down and got an email that due to child theme site has an error, already shared snapshots with you in previous tickets.
And when I restored so I have not added again anything because I wanted you to check my child theme..
To add a RankMath Breadcrumb you can add this shortocode to a Hook Element ( NOT IN CHILD THEME):
[rank_math_breadcrumb]
https://docs.generatepress.com/article/hooks-element-overview/
Make sure you check Execute Shortcodes.
And set your Hook to any of the ones displayed here:
Thanks David,
I am first time creating a hook, so sharing snapshot just cross-check that I am not making any mistakes ??
https://www.dropbox.com/s/ralwdme32w9cv9r/hook.png?dl=0
and display location i selected "Blog", is it okay ??
Thats correct.
You will want to change the hook to a different one eg. before_main_content
The visual guide link provided above shows where each of them will appear.
The Display Rules > Locations you can set many.
To have the breadcrumb displayed above your single posts set the Display Location to Posts > All Posts
I did it, but seems something is wrong, refer snap -
As i said you can use the visual guide to select a different position for the hook - reference here again:
https://docs.generatepress.com/article/hooks-visual-guide/#single-post
Try the generate_before_content hook this will place it within the article container above your title.
Okay, I got it, but how to set the featured image below the title then so that it will look good, as the featured image is set by default so GP pulling data from the default setting ??
Refer here -
https://venusentertainments.com/stars-of-the-avengers/
also, give some CSS to style it like below -
https://www.shoutmeloud.com/how-to-start-a-beauty-blog.html
Regds:
Is the breadcrumbs issue resolved?
If so can you open new topic for the featured image question?
Please also take a look at this article first:
https://docs.generatepress.com/article/adjusting-the-featured-images/
:(