generatepress-child
generatepress-child copied to clipboard
Breadcrumb code: Suggestion
This is not an issue but a suggestion. I suggest you swap out the breadcrumb code you have for this. I've spent close to three hours trying to remove the separator, especially for a posts nested under more than one category, but failed with the code in your child theme (which I am very grateful for). Dimox's breadcrumbs did it in less than a minute. Plus, Dimox's has structured data from the get go.
You have great timing, @baabanai. I spent a couple of hours last on a project trying to tweak the current breadcrumb code and got frustrated. I'll definitely check this out and see about switching. Thanks for sharing!
how can I remove breadcrumbs in-home and page? I tried to set 0 in breadcrumb.php but still shown Home > in all pages
If you want to remove the breadcrumbs completely, all you have to do is comment out this line in functions.php:
require get_stylesheet_directory() . '/inc/breadcrumbs.php';
Setting $showOnHome to 0 should hide the breadcrumb on the homepage. Is it not working in your case?
Yes, i did that, comment out those lines
On Fri, Sep 3, 2021, 9:52 PM Addison Hall @.***> wrote:
If you want to remove the breadcrumbs completely, all you have to do is comment out this line in functions.php:
require get_stylesheet_directory() . '/inc/breadcrumbs.php';
Setting $showOnHome to 0 should hide the breadcrumb on the homepage. Is it not working in your case?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/addisonhall/generatepress-child/issues/5#issuecomment-912598365, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACFI7IPNC4LUWWEGBN7CNRLUADOK3ANCNFSM43QMY5RA .
If you've commented out the breadcrumb.php reference in functions.php and still see a breadcrumb on your site, I'd guess that you possible have something else adding the breadcrumb... Another plugin, perhaps?
I tried to set 0 too in showonhome and page perhap but , breadcrumbs home > pagename still appeared, thats why I'm commented out after else well i don't really need breadcrumbs since the sites only homepage and some pages
@malikshi open up the functions.php file within the child theme, find this line:
require get_stylesheet_directory() . '/inc/breadcrumbs.php';
and comment it out like so:
//require get_stylesheet_directory() . '/inc/breadcrumbs.php';
That should disable the breadcrumbs completely.
Thank you for tmthe better solution