How to disable breadcrumbs on mobile?

Posted in: Newspaper
Post count: 200

Hi guys,

How can I stop breadcrumbs from loading on mobile devices?
FYI: We don’t use the tagDiv mobile theme. We use a child theme.

Thanks!

Post count: 20688

Hi,

You could simply hide them with Css on specific width limitations, like the solution provided in this topic
https://forum.tagdiv.com/topic/hide-breadcrumbs-on-mobile/
That would be easier. If you want to stop them from loading you would probably require to modify all the files from the theme where breadcrumbs are displayed, and create a condition for this if possible. That will probably mean a lot of hard work to achieve.

Thanks

Post count: 200

The provided suggestion there is to add the following code in the custom css theme field


@media
(max-width:767px){
.td-entry-crumbs{
display:none!important;
}
}

After adding it, breadcrumbs still appear on mobile.

Post count: 20688

Hi,

Yes it seems the class used has changed, sorry about that. Please try it like this

@media (max-width:767px){
.entry-crumbs{
display:none!important;
}
}

The code must be entered in Theme panel->Custom Css section.

Thanks

Post count: 200

Hi,

thanks Simion.

This way it works but the breadcrumbs are always first shown and them hidden, which isn’t what I need. I need to hide them so that the visitor doesn’t see them at all on mobile. Is that possible?

And by the way, for some reason, breadcrumbs don’t display properly on post pages on mobile. Only the Home is visible, not the following category name (I don’t include the name of the page in the breadcrumbs).

Thanks

Post count: 20688

Hi,

If there is a delay before the breadcrumbs are removed, you could enter the code provided directly in the theme style.css file instead of the theme panel, at the end of the code. use a text editor to edit the file and place the code at the end. That way they will not be visible and they will be removed at loading.
The breadcrumb structure can be changed in the theme panel
https://forum.tagdiv.com/breadcrumbs/

Thanks

Post count: 200

I added the code to the style.css in my child theme (which contains very few lines of code, most of the css are in the style.css which is in the parent theme and is minified) and it works now as I need it.

Thank you for your support!

Post count: 200

Hey guys,

I have one more question about the breadcrumbs and it’s about the breadcrumbs on woocommerce product pages (woocommerce installed to the theme).

The breadcrumbs appear on all product pages, but the very first word for example Home links to the home page of the site (the domain). The following words that represent woocommerce product categories, are linked correctly.

I need to change the Home link to lead to the shop’s home page, not to the site’s home page. This concerns only woocommerce product pages. Could you please help with this?

Thanks

Post count: 20688

Hi,

You could do that with the example from this guide
https://docs.woocommerce.com/document/customise-the-woocommerce-breadcrumb/#section-3
Try adding the code mentioned in the theme (or child theme) functions file, and test it. Then change the address to what you need.

Thanks

Post count: 200

Thank you, Simion!

Viewing 10 posts - 1 through 10 (of 10 total)
The forum ‘Newspaper’ is closed to new topics and replies.