Site logo

Archived topic

how to get rid of breadcrumb on mobile devices

5 replies · Started by PING Yao on December 17, 2020

Viewing posts 1–6 of 6

Hi Ying,

It's never a good idea to modify the theme's function.php file, as the modifications will be erased during updates.

Using the hook element is the best method to add the breadcrumbs:
https://docs.generatepress.com/article/adding-breadcrumbs/#using-hooks-element

In step 2, add your short code like this:

<div class="grid-container grid-parent hide-on-mobile">
    yoast short code here
</div>

In step 3, use generate_after_header instead of generate_before_entry_title.

In step 5, select Entire site instead of Post.

Let me know if it works!

Hi Ying,

Do you mean this

<div class="grid-container grid-parent hide-on-mobile">
[wpseo_breadcrumb]
</div>

It seems like something wrong.
breadcrumb still can be seen on mobile device

thanks
Best Regards,
Henry

Hi there,

i just checked your site and the Breadcrumb has been removed on Mobile.
Try clearing your browser caches or check the site in a private/incognito browser.

This archived topic is closed to new replies.