How to Show or Hide Widgets on Specific Pages without Plugin

Do you want to show or hide widgets on specific pages in WordPress? You can do this now. In this post we’ll let you know that how to show or hide widgets on specific pages without plugin.

Now you can show or hide widgets on specific pages without using any plugin. This is tiny snippet which is added by Joel Worsham. Firstly you just need to have the ID name of widget which you want to describe. You have two option either it can be done by viewing page source to view the widget id or you can view it using a web inspector tool as well.

The present sample is setup to show essential ‘pages’ widget on the contact page only. Keep in mind that is_page also is also accepted by an array of page names and id’s.

<script src=”https://gist.github.com/maanali/99f419cb3c0a844a28ba.js”></script>

Source

0 Likes
Riz
Riz

Passion is beyond limitation. If you’re passionate about ANYTHING, nobody can stop you not to do what you want. Blogging and Web Designing is my passion that don’t drive me to do what I want but push me as well to share fanatical stuff with people.

Your email address will not be published. Required fields are marked *

div#stuning-header .dfd-stuning-header-bg-container {background-image: url(http://www.downgraf.com/wp-content/uploads/2017/04/login-back.jpg);background-size: cover;background-position: center center;background-attachment: scroll;background-repeat: no-repeat;}#stuning-header div.page-title-inner {min-height: 500px;}