Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breadcrumb code: Suggestion #5

Open
baabanai opened this issue Apr 24, 2021 · 8 comments
Open

Breadcrumb code: Suggestion #5

baabanai opened this issue Apr 24, 2021 · 8 comments

Comments

@baabanai
Copy link

baabanai commented Apr 24, 2021

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.

@addisonhall
Copy link
Owner

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!

@malikshi
Copy link

malikshi commented Sep 3, 2021

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

@addisonhall
Copy link
Owner

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?

@malikshi
Copy link

malikshi commented Sep 3, 2021 via email

@addisonhall
Copy link
Owner

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?

@malikshi
Copy link

malikshi commented Sep 3, 2021

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

@addisonhall
Copy link
Owner

addisonhall commented Sep 3, 2021

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

@malikshi
Copy link

malikshi commented Sep 3, 2021

Thank you for tmthe better solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants