generatepress-child icon indicating copy to clipboard operation
generatepress-child copied to clipboard

Breadcrumb code: Suggestion

Open baabanai opened this issue 4 years ago • 8 comments

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.

baabanai avatar Apr 24 '21 18:04 baabanai

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!

addisonhall avatar Apr 26 '21 13:04 addisonhall

how can I remove breadcrumbs in-home and page? I tried to set 0 in breadcrumb.php but still shown Home > in all pages

malikshi avatar Sep 03 '21 13:09 malikshi

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?

addisonhall avatar Sep 03 '21 14:09 addisonhall

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 .

malikshi avatar Sep 03 '21 14:09 malikshi

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?

addisonhall avatar Sep 03 '21 14:09 addisonhall

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 avatar Sep 03 '21 15:09 malikshi

@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.

addisonhall avatar Sep 03 '21 15:09 addisonhall

Thank you for tmthe better solution

malikshi avatar Sep 03 '21 15:09 malikshi