Using the storefront theme, I want to remove breadcrumbs when logged in to the administrator panel WooCommerce |Products Store Activity| Inbox| Orders| Stock| Reviews| Notices| breadcrumbs.
Please note this: I need if you are logged in as the current user, not an administrator. The code I used using CSS:
.woocommerce-layout__header-breadcrumbs {
display: none !important;
}
.woocommerce-layout {
display: none !important;
}
7
Answers
That code would work fine, but the question is where do you use it? The CSS would affect only the frontend while the Admin End has a different style sheet source. You can try adding an Add Admin CSS plugin to post that code or use a custom action like this below in your function.php file:
Output:
Add the following code snippet to your active theme’s functions.php file –
UPDATED 2020:
As of 28 March 2020, for all users, the following code removes the new Woocommerce Header added into the WordPress Admin. Put the following in your theme’s functions.php file:
After WooCommerce 5.2, we have to cancel the margin of #wpbody. This code snippet is the revised version of itzmekhokan’s and still is active.
—Addition—
The class name has changed from around version 6.5.