By Steph — September 6, 2009
113 Comments | Leave a Comment
Change your sidebar content with each page. Avoid creating multiple sidebars and duplicating widgets by adding check boxes to each widget in the admin (as long as it is written in WordPress version 2.8 format) which will either show or hide the widgets on every site page. Great for use with Thesis theme, or just to avoid extra coding.
Changelog
1.5: Added “404 Page” check box
1.4: Changed “Home Page” check box to “Blog Page”
1.3: Added check box for Home page if it is the blog page, Added check boxes for single post and archive pages, Save hide/show option correctly for more widgets
1.2: Save page check boxes for more widgets
1.1: Fixed bug that prevented other widget options to be displayed
Update: Please post issues and questions in the support forum
Hi! I think I’m also getting the same problem with some users here. I got the plugin installed and it seemed not to work with my current theme (News Leak). I installed the same plugin in a separate blog using a theme based on PageLines framework so I believe this has something to do with the theme. Do you have any suggestion how to fix this without having to replace the theme? I appreciate it a lot. Thanks!
-Bert
still loving the plug in – still not sorted the home page out but i’m not too bothered about that.
One small wish….I’ve got a couple of pages where i’ve added a sub menu in the side bar, with a separate text widget immediately above along the lines of ‘select from menu below’. Works great but – there is a lot of space between the two and i’d like to reduce it down. Anyone have any ideas?
Cheers
Liz
I installed the plugin always worked fine until I got now over 5000 wordpress pages.. and only the pages starting with the “A” are showed to check for hiding or showing.
I’ve using it for about 2 months and it’s great. I have one issue. There is one widget, About me, that I only want to show on one page but for that one widget, it does not give you the checkbox option. Ironically, this was the reason I used Display widgets. Any suggestions?
@max, Around line 264, you’ll find this:
‘numberposts’ => 999
Change 999 to -1. This will be included in the next version.
@Chellie, please refer to the FAQs for this plugin.
http://wordpress.org/extend/plugins/display-widgets/faq/
Hey Steph,
Loving this plugin!
I have run into a unique way to use this plugin and was wondering if you had any advice.
Basically, I have a WordPress page template that will loop through every child page and display the title, content and sidebars. So the sidebar gets called inside a custom WordPress loop as it loops each child page.
Here’s my code so far which will work but shows the parent page sidebar instance each time if gets called in the loop.
$currentpageid = $post->ID;
$args = array(
‘post_parent’ => $currentpageid,
‘post_type’ => ‘page’
);
// The Query
$the_query = new WP_Query( $args );
// The Loop
while ( $the_query->have_posts() ) : $the_query->the_post();
?>
<?php
endwhile;
wp_reset_postdata();
I was thinking I might write a function that would accept a post/page ID and return the widgets for that page.
Not sure if this is clear but if you have any questions, ideas or suggestions you can reply or email me at beaudrymatt@gmail.com
Thanks so much and great work on this plugin!
Matt
Great plugin you have here..I use it repeatedly on most of my site.
WPML support in the latest version (1.22) of this plugin is not implemented correctly. For example, if I select ‘Front Page’ option and one of the added WPML languages, and the check box is set to “show only on following pages” then only ‘language’ option is activated but other set check box (‘Front Page’) is ignored. The result is that the content of the widget is not only shown on Front Page but also on all other pages that are associated with the the selected language. I think you should check against ‘and and’, not against ‘and or’ which I think is the case now.
Thus (e.g.):
‘Front Page’ + ‘Spanish’ = Content is shown only on Front Page and when Spanish language is selected.
Is it possible to make this work any time soon in an updated version of a widget. Thanks!
I have noticed the same problem as TJ and since I’m using WPML it has rendered the widget useless. You have to select one of the languages and when you do, it shows the widget on every page for that language.
I’ve had to revert to the previous plugin release to get this working.
I just want to also add that this is the first time I’ve had a problem with this widget and it has come in very handy with my wordpress projects.
How can I provide a check in my template if the widgets are displaying/are existing on a particular page. When I use is_dynamic_widget. I’m always getting a value of 1 whether the widgets are on or off. is_active_sidebar() just doesn’t seem to work at all.
Any suggestion?
this widget slows my genesis/lexicon widget page down to a crawl – as in taking 60-120 seconds to open a drop down menu in the primary sidebar. terrible!
deactivate the widget – everything works fine.
So, I’m using this plugin on a site I am building for a client. LOVE it BTW – it has really helped me out. However, recently it has stopped allowing me to add widgets to the home page. I mean I can add them to the sidebar, but they don’t appear unless I choose a sub-page. All the older widgets set to “home” work just fine, but can’t add any new ones. I would be VERY grateful for some help on this. Thanks
Thanks so much for this plugin!! I’ve been looking for something like this for ages and had pretty much decided to give up looking and write my own.
One thing I found is that the display-widget.php code needed to be altered in order for my widgets to display on the homepage when the ‘Front page’ checkbox was ticked. Here’s what I changed:
if (is_home()){
//$show = isset($instance['page-home']) ? ($instance['page-home']) : false;
$show = isset($instance['page-front']) ? ($instance['page-front']) : false;