{"id":26983,"date":"2021-07-17T15:00:26","date_gmt":"2021-07-17T13:00:26","guid":{"rendered":"https:\/\/qodeinteractive.com\/magazine\/?p=26983"},"modified":"2021-07-15T11:12:21","modified_gmt":"2021-07-15T09:12:21","slug":"how-to-show-or-hide-widgets-on-specific-pages-in-wordpress","status":"publish","type":"post","link":"https:\/\/qodeinteractive.com\/magazine\/how-to-show-or-hide-widgets-on-specific-pages-in-wordpress\/","title":{"rendered":"How to Show or Hide Widgets on Specific Pages in WordPress"},"content":{"rendered":"<div class=\"wpb-content-wrapper\"><p>[vc_row][vc_column][vc_column_text]It\u2019s only natural to strive for a unique website with enticing pages, whether you&#8217;re running a site for private or for business purposes. To make the visitors stay as long as possible and inspire them to browse the pages, <strong>we use everything that is proven to work &#8211; compelling articles, stunning imagery, various media types of content<\/strong>, and so on. We strive to make our pages not only beautiful but also functional. That&#8217;s when many of us realize how powerful widgets are in terms of user experience and functionality. Plus, they are a great way to customize your WordPress theme and stand out from others who are using the same template. But, <strong>not all widgets are necessary on all pages<\/strong>, and sometimes they can actually get in the way of communicating a message or achieving a certain effect. That\u2019s why <strong>we often need to hide specific widgets as sometimes they are not appropriate for all pages.<\/strong>[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Since WordPress does not come with a native feature to control widgets\u2019 visibility on specific pages, posts, or archives, <strong>hiding and showing widgets may require advanced coding skills<\/strong>. Or, at least that\u2019s what it seems. However,<strong> there\u2019s also a simple solution in the form of a plugin<\/strong>. And even if you are good with code, sometimes the plugin simply offers a more straightforward solution.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]In this article we\u2019ll show you how to hide widgets using a plugin, but before we get into the specifics, let\u2019s first take a look at some of the situations that warrant hiding a widget on certain pages.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\">Why Displaying All Widgets on Every Page is Not a Good Idea<\/h2>\n<p>[\/vc_column_text][vc_column_text]One of the aspects of a good user experience is <strong>smart widget placement &#8211; knowing where and why to display a specific widget<\/strong>. For example, you&#8217;re probably not going to need a login widget on the login page as this page usually already has some type of login form, and adding another one in the sidebar or header is simply not necessary. <strong>Consider carefully where a specific plugin will naturally extend the purpose of a page<\/strong> and avoid adding a widget just for the sake of having one. For example, adding a search box widget on your custom 404 error page may be a great way to make the visitor stay on your website, but that particular page will probably not benefit from, let\u2019s say, a weather widget, not will your login page. As for the homepage, the last place you want to stuff with too many widgets &#8211; <strong>a homepage that is too busy and cluttered may turn the visitors off<\/strong> and prevent them from browsing your website further, especially if they fail to find the content they originally came for.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]The key to smart widget placement is to<strong> tune yourself to the needs of your users<\/strong>, and practical ideas will come.[\/vc_column_text][vc_empty_space height=&#8221;80px&#8221;][vc_widget_sidebar sidebar_id=&#8221;new-top-picks-banner&#8221;][vc_empty_space height=&#8221;80px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\">Managing Widgets Visibility Using a Plugin<\/h2>\n<p>[\/vc_column_text][vc_column_text]When it comes to showing or hiding widgets on specific pages, we wanted to offer a solution that would be accessible to everyone, so we tested a couple of free plugins. In our opinion, the <a href=\"https:\/\/wordpress.org\/plugins\/widget-context\/\" target=\"_blank\" rel=\"noopener\">Widget Context plugin<\/a> turned out to be<strong> the most reliable and easy-to-use plugin. It is intuitive and flexible<\/strong> and allows you to hide and show widgets on selected pages and sections of your website in just a couple of steps. Plus, it is a lightweight tool that doesn\u2019t affect your website\u2019s performance.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]To get started, you need to install the plugin. We will not go into details about its installation as the process is just the same as with any other plugin. In case you need more assistance regarding this step, it\u2019s best to read our detailed <a href=\"https:\/\/qodeinteractive.com\/magazine\/how-to-install-a-wordpress-plugin\/\">tutorial for installing a WordPress plugin<\/a> by clicking on the above link.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]After installing and activating the plugin, you will notice the new Widget Context option in your dashboard menu, below the Widgets, but to access the new settings you need to click on <strong>Appearance \u00bb Widgets<\/strong>.[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"518\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Widget-Context.jpg\" class=\"attachment-full size-full\" alt=\"Widget Context\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Widget-Context.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Widget-Context-300x160.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Widget-Context-768x411.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Widget-Context-620x331.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]When you get to the Widgets page, simply choose any widget you want to adjust the settings for and click on it. A Widget Context dropdown with various options will show.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"528\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Widget-Context-Dropdown.jpg\" class=\"attachment-full size-full\" alt=\"Widget Context Dropdown\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Widget-Context-Dropdown.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Widget-Context-Dropdown-300x163.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Widget-Context-Dropdown-768x418.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Widget-Context-Dropdown-620x338.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]You can set the widget to show or hide on all pages, but the options that are most important for us here are those for showing\/hiding widgets only on specific pages or sections. If you choose the custom show\/hide option, two lists will open below where you simply tick where you want the widget to hide or show:<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"560\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Widget-Context-Options.jpg\" class=\"attachment-full size-full\" alt=\"Widget Context Options\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Widget-Context-Options.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Widget-Context-Options-300x173.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Widget-Context-Options-768x444.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Widget-Context-Options-620x358.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]As you can see, the lists of places where you can choose to show\/hide your widgets are very precise and diverse.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]In case you want to show\/hide widgets on specific URLs, there are options for that too, just scroll down:<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;50px&#8221;]<div class=\"qodef-single-image-holder   qodef-has-border \">\n    <div class=\"qodef-si-inner\" >\n                                    <img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"594\" src=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Widget-Context-Options-2.jpg\" class=\"attachment-full size-full\" alt=\"Widget Context Options\" srcset=\"https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Widget-Context-Options-2.jpg 969w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Widget-Context-Options-2-300x184.jpg 300w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Widget-Context-Options-2-768x471.jpg 768w, https:\/\/qodeinteractive.com\/magazine\/wp-content\/uploads\/2021\/07\/Widget-Context-Options-2-620x380.jpg 620w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/>                        <\/div>\n<\/div>[vc_empty_space height=&#8221;38px&#8221;][vc_column_text]In the <em><strong>Target by URL<\/strong> <\/em>field, enter the URL on which you want the widgets to show. To hide widgets on specific URLs, enter those URLs in the field <em><strong>Exclude by URL<\/strong><\/em>.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]When you have adjusted all the settings as per your needs, don\u2019t forget to click on <em><strong>Save<\/strong><\/em>.[\/vc_column_text][vc_empty_space height=&#8221;28px&#8221;][vc_column_text]Also bear in mind that the procedure for hiding\/showing them in specific places is the same for every widget regardless of their location or function.<br \/>\n[\/vc_column_text][vc_empty_space height=&#8221;68px&#8221;][\/vc_column][\/vc_row][vc_row][vc_column][vc_column_text]<\/p>\n<h2 class=\"qodef-h4\">Let\u2019s Wrap It Up!<\/h2>\n<p>[\/vc_column_text][vc_column_text]Every WordPress theme comes with a different structure, features, and design. <strong>Widgets bring more freedom to theme users allowing them to personalize it.<\/strong> It would be a pity not to <strong>take advantage of the possibility to manage widgets visibility individually,<\/strong> considering how easily it can be accomplished. Showing\/hiding widgets on specific pages of your website gets you one step closer to a great user experience.[\/vc_column_text][\/vc_column][\/vc_row]<\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Don&#8217;t need all widgets to be displayed on all pages on your website? Learn how to show or hide widgets on specific pages in a couple of steps.  <\/p>\n","protected":false},"author":42889,"featured_media":27005,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[4,62,13],"class_list":["post-26983","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-tips","tag-widgets","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts\/26983","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/users\/42889"}],"replies":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/comments?post=26983"}],"version-history":[{"count":0,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/posts\/26983\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/media\/27005"}],"wp:attachment":[{"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/media?parent=26983"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/categories?post=26983"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qodeinteractive.com\/magazine\/wp-json\/wp\/v2\/tags?post=26983"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}