Hide the method to hide the components in Woocommerce? If so, then you have landed in the right place. We will show you all possible methods to hidden or delete online store components in this tutorial.
What are the small components in WordPress?
Small components can be added to the sidebar, footprint and various types of content or elements of the website of the website. It allows you to
to set specific functions , such as calendar, clock, weather reports, etc. Depending on the different components, they even help increase the function of the website.
Most topics provide a series of standard small components. For example, \”text\” small components can be used to output simple text (including HTML). Similarly, there are small components used for images, audio, menu, categories, RSS, recent comments.
According to your business nature, we may not always need all small components provided by themes. So the best way is to hide them. But before you hide small components in Woocommerce, you must understand why you may still need to disable or even delete small components.
Why hide small components in Woocommerce?
Whether you want to increase the customer experience or make your WOOCOMMERCE website stronger, small components occupy an important position in your website development. Most small components have the corepress core, and from the beginning
can be used in each installation
. But according to your customers, your store may not need certain small components. Assuming you have a Woocommerce website, you want to add operating videos in it. You may then need a lot of video components. But at the same time, if you have audio components, it doesn’t make any sense and it seems unnecessary.
Similarly, your website may have the nearest post/comment, news subscription block or weather forecast. If so, they are very inappropriate on each page of your website. For the WOOCOMMERCE page such as checkout pages or shopping carts, these small components are not required. You can disable comments in WordPress, but this solution does not apply to all small components.
In addition ] It directly affects the user experience. This is why it is best to hide too much value to users in Woocommerce and
to improve the availability of the entire website.
How to hide the WooOCommerce small component? You can use two different methods
to hide small components in WooCommerce.
Bring plug -in Programming
- Before starting this tutorial, make sure you have set woocommerce
- , and and, and, and, you are set. There will be no missing steps.
, and and and and, and, and, and,, and you set woocommere
1. Use the plug -in to hide small components in WooCommerce
In terms of small parts, the default WOOCOMMERCE function provides very little features
. It does not allow you to hide small components in Woocommerce. Therefore, if you want to hide or disable the small parts on a specific page or post, you should use a special plug -in.
There are several free and advanced tools in hidden components. These are some of the best tools you can use to hide your unimportant tools for your Woocommerce website. Small component options
Widget Options is a WordPress plugin that allows you to completely control you small parts. It has more than 100,000 installations and is one of the most popular component management solutions plug -in in WordPress. Therefore, you can use this plug -in to hide or delete the small parts on your website.
It has a user -friendly interface and is seamlessly integrated with Woocommerce, which can be easily used to customize your small components. You can also use a small component to search the filter to find a specific small component to be edited.
Main features
Hide the title of a small component
imported or exported small components
Real -time component search [12 12 [12 12]3] Display or hide small components on specific devices
- Small component logic-conditional hidden and displayed small components
- Price
]
Small components options with free and advanced versions. You can expand the function from $ 19 per year.
小部件禁用

[123 ] Widget Disable is a free plug -in. You can use it to hide the sidebar small components in a very simple way. The plug -in shows all the components on your website and let you choose a small component to be hidden. Not only that, you can even disable the small components of the dashboard to make your instrument board area less chaotic.
The plug -in is also lightweight, which will not overload or affect your web speed. In addition, it is also a friendly plug -in for developers, and even provides filters to eliminate small components on the sidebar or instrument board.
Main features
- Suitable for beginners and developers
Simple and easy -to -use interface
Disabled sidebarbarbar The widget of the instrument panel
provides filters to modify the files of the core part
Price
Widget Disable is a free plug -in. You can it from the official WordPress plugin storage.
Use a small part to disable plug -in to hide small components in Woocommerce
Now we have already understood the plug -in, let us see how to use them. So for this demonstration, we will use
Widget Disable
plug -in to hide small components in Woocommerce. It is a free plug -in, which is very easy to use, the interface is simple, and the work can be perfectly completed.
However, if you prefer to use any other plug -in, you can do this. No matter what plug -in you use, the process is similar. But you need to install and activate it before starting it.
1.1. Install and activate the plug -in
To install the plug -in, please transfer from WordPress instrument board to
plug -in \u0026 gt; add a new
plug -in, and then search in the search bar on the right
Widget Disable plug -in. Then, click to install immediately and activate after the installation is completed.
If you use the WordPress plug -in repository, you need to and install it manually. Please read our guidelines on how to manually install the WordPress plug -in to get more information.
1.2. Use plug -in hiding small parts
The best point of the Widgets Disable plug -in is that you do not need to configure or change any settings.
After activating the plug -in, you will be able to be able See disabled parts option. Just select this option, and you will be redirected to the page of all the components and dashboard components listed by all sidebar boards.
You can choose a small component to be hidden from these tabs. If you want to hide any sidebar parts of the sidebar, click sidebar small components and
to check the hidden components
.
If you also want to hide any of them, perform the same operation to the dashboard component . Once you choose a small component hidden from the sidebar and the instrument board, make sure that
is stored and changed
.
As you can see, it takes only a few steps and little time to hide small components in Woocommerce. Similarly, if
shows any disabled components,
You only need to cancel the selection of the box to enable it. Your hidden small components will appear on the website without mistakes.
Is it effective? well done! You can now use a special plug -in to hide the small components in the Woocommerce store.
2. Hide a small component in a programming method Assuming you don’t want you don’t want Use a plug -in to disable small components in Woocommerce. The plug -in increases the weight to your website, you may prefer efficientAnd lightweight framework. If you have any other similar reasons to avoid using a plug -in, you can also use programming methods to hide small components. But in order to further, we strongly recommend that you back up your website and use the theme of the sub -theme, because we will modify the core part of your theme. You can use code to create sub -themes, or you can use sub -theme plugins. Don’t worry, these plugins are important to your website and will not have much impact on your lightweight framework. Now, from your sub -theme to
appearance \u0026 gt; theme file editor
and open
Functions.php
file.
All you need to do is copy the following code and paste it to the bottom of the file of to
functions.php
.
add_filter (\u0026#39; sidebars_widgets \u0026#39;, \u0026#39; quadlayers_Conditionally_hide_widget ;功能quadlayers_woocommerce_conditionally_hide_widget($sidebars_widgets){如果(!is_admin()){如果( is_cart() ) {foreach ( $sidebars_widgets as $sidebar_id \u003d\u0026gt; $sidebar ) {$key \u003d array_search(\u0026#39;estore_woocommerce_product_grid-1\u0026# 39 ;, $ Sidebars_widgets [\u0026#39; TG-COLUMN-4 Collection-BLOCK \u0026#39;]; ($ SIDEBARS_WIDGETS [\u0026#39; TG-COLUMN-4 collection block \u0026#39 ;] [$ Key]);}}}} Return to $ SIDEBARS_WIDGETS;} In this presentation, we hide the promotional small components in the left sidebar. So first of all, we need to find widget ID and SIDEBAR ID to make the code fragment work normally.
To get a small part ID, please left -click the selected component and click inSpect . In this case, a small component ID is provided in the section ID \u003d tag.
Similarly, to find the sidebar ID, you can move the cursor to other elements in the element. If you highlight the small components when you choose a specific class or ID, then this is more likely to be your sidebar ID. This is one of the easiest ways to find the sidebar ID with the help of checking elements .
After finding the small component ID and the border field ID, you can now change from
to
to functions.php file and paste it The code we provided above.
If you look at the screenshot above, our small component ID is \”
ESTORE_WOOCOMMERCE_PRODUCT_GRID-
\”. When you copy and paste the code segment, replace the \”
ESTORE_WOOCOMMERCE_PRODUCT_GRID-\” to your own small component ID. The same is true of the sidebar ID. According to our theme, our side fence ID is \u0026#39; TG-COLUMN-4 Collection-Block \u0026#39;, you must replace it with your own sidebar ID, otherwise the code will It will not work.
As a result, you can see that the promotional small parts are not displayed at the front end of the Woocommerce website.
That’s it! You have used code fragments to successfully disable the small components hidden in Woocommerce. You can modify the code as needed to hide more small components. Reward: How to create a custom titles of the title
You already know why and how to hide small components in WooCommerce. Similarly, you may want to create a custom titles component for your website
.
Most WordPress themes do not allow you to add small component regions above the content or title. However, if you add a self -defined title componentYour website can stand out from competitors and add some functions. For example, you can display advertising, recent articles or any similar elements.
It is very easy to create a customer title component with the help of code fragment. All you have to do is add the core part of
to the
function.php
of theme. But in order to add a custom title small part, we need to create a new small part area first.
1. Create a new small component area
To create a new small component area for your custom title, you need to add the code fragment to your theme file Essence
But before that, let’s take a look at the available small parts provided by your theme. So from your WordPress dashboard to appearance \u0026 gt; small components .
All activity areas of the theme can be seen here. This is where we will add a new small part area.
Now let us continue to create a new small component area. We need to adjust the sub -theme
Functions.php
, similar to hiding small parts in a programming manner. If you are not convenient to edit files directly, you can also use plugins such as Code Snippets.
We will use the Code Snippets plug -in in this tutorial. First, install the plug -in and activate it.
After the activation, we can find the plug -in settings under the WordPress instrument panel snippets \u0026 gt; all snippets . Now click
ADD New
to create a new fragment.
We named it \” Custom title \”, but you can name it. Copy and paste the following code into the code section. Function quadlayers_widgets_init () {register_sidebar \u0026 gt; \u0026#39; custom title \u0026#39;, \u0026#39; beFore_widget \u0026#39; \u003d \u0026 gt; \u0026#39; \u0026 lt class\u003d \u0026 quot; ql-widget \u0026 quot; \u0026 gt; \u0026#39;, \u0026#39; after_widget \u0026#39; \u003d \u0026 gt; \u0026 lat \u0026 \u0026#39;, \u0026#39; \u0026#39; \u0026 lt; h2 class \u003d \u0026 quot; ql-tital \u0026 quot; \u0026#39;, \u0026#39; after_title \u0026#39; \u003d \u0026#39;/h2 \u0026#39 ;,)) } add_action (\u0026#39; widgets_init \u0026#39 ;, \u0026#39; questionrs_widgets_init \u0026#39;);
After the code is stored, the new parts will be in your The WordPress site was created as
custom title widget .
2. Add widget to header
To add a small part to the title, we need to edit the header.php file. You can use the
appearance in the WordPress dashboard \u0026 gt;
Theme file editor
Navigation to find the header file in the theme editor. Now, open the
theme header file (header.php)
here and paste the following code here.
\u0026 lt; php If (IS_ACTIVE_SIDEBAR (\u0026#39; Quadlayers-Header-Widget \u0026#39;)):? \u0026gt;\u0026lt;div class\u003d\u0026quot;ql-widget-area widget-area\u0026quot; role\u003d\u0026quot;complementary\u0026quot;\u0026gt;\u0026lt;php dynamic_sidebar(\u0026#39;quadlayers-header-widget\u0026#39;); \u0026gt;\u0026lt;/ div \u0026 gt; \u0026 lt; php endif; \u0026 gt; As usual, after adding code update file.
Now, let’s add a small component to a new small part area. Here, we added a
paragraph block
to test the small components.
As a result, you should be able to see the title at the front end of the website.
But you may have noticed that you need
Attractive. You can further customize it and control the visibility of the title of the title according to this guide.
Conclusion
This ends our guidelines for hiding small components in WooCommerce.
If you don’t want to show unnecessary elements in the website,
, the website is slow and messy,
It will be very useful to hide specific small components. However, only the small components you actually need can be
to improve the overall usability of the Woocommerce store
. In short, we provide you with two different methods to hide small components on your website:
Use plug -in
Programming method The easiest way to hide small components is to use plug -ins. However, the code clips we use today are also very simple and easy to customize. You can define it by looking for a small component ID and rename it to make the code apply to your website. In addition, we also include a part of to create a custom title
to create some additional small component space without hindering the main menu. They help display your latest discounts, discounts and advertisements in a organized way. Similarly, if you want to add more custom small components, we also use Instagram Feed Gallery to add a guideline to Instagram Feed.
Finally, you may need to view more articles to further improve your WOOCOMMERCE store and customer experience:
- How to edit title in WordPress
- Customized definition The best plug -in plug -in of the WOOCOMER product page
How to customize the WooCommerce template
Can you now hide the small parts in the e -commerce website? Have you done it before? We are glad to understand it in the comments below.