Hide a particular widget on a page
-
Hi,
I have four custom widget area in the footer and accordingly I have added 4 widgets to each of the widget areas.
In one of the widgets (sidebar-2) I have two widgets. I wish to display one of the two (sidebar-2) in my blog page and keep it hidden from rest of the site. How to execute this using php conditional tags.
I tried this one but did not work
<?php if(! is_active_sidebar( 'sidebar-2' ) && is_page(2831) ) <div id="recent-posts-2"> <?php endif; ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Hide a particular widget on a page’ is closed to new replies.