Support » Plugin: Simple Page Sidebars » [Plugin: Simple Page Sidebars] hiding sidebars

Viewing 15 replies - 1 through 15 (of 17 total)
  • I’m in 2010 theme and this is not working. any thoughts?

    globalreporter, that’s beyond the scope of this plugin.

    turiyamoore, it will work fine in Twenty Ten, but you’ll need to make some changes to integrate per the installation instructions. And please start a new topic in the future so anyone that might be experiencing a similar issue can find the answer.

    Around line 20 of sidebar.php, you should see this:

    if ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?>

    Replace that with this:

    if ( function_exists( 'simple_sidebar' ) ) :
    	simple_sidebar( 'primary-widget-area' );
    elseif ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?>

    Then drop this snippet in your functions.php file so that the HTML will match your theme:

    add_filter('simpsid_widget_area_defaults', 'twentyten_widget_area_defaults');
    function twentyten_widget_area_defaults($defaults) {
    	$defaults['before_widget'] = '<li id="%1$s" class="widget %2$s">';
    	$defaults['after_widget'] = '</li>';
    	$defaults['before_title'] = '<h3 class="widget-title">';
    	$defaults['after_title'] = '</h3>';
    	return $defaults;

    That should take care of everything, however, you’ll need to be aware that if you ever upgrade or switch your theme, you’ll need to make the same changes again.

    Blazer Six Thank You for your reply.
    I believe I followed your instructions but still see no effect on the site. In the dashboard everything is as it should be. It appears to work there, but not display.

    One concern I have is I’m not sure I know exactly how to “drop in” that HTML snippet above. Here is a copy of what I have in functions.php. any thoughts you might have I’m really interested to hear! thanks!

    [Code moderated as per the Forum Rules. Please use the pastebin]

    That should work fine for functions.php. Did you make the change in sidebar.php as well? That’s the most important one.

    If you haven’t assigned a custom sidebar to a page or added any widgets to that custom sidebar, your default sidebar will continue to display, so make sure you’ve done that as well.

    Hi, I did make the change in sidebar.php and I have the alternate sidebar showing in my “All Pages” view. It lists the custom sidebar in a sidebar column. The side bar has a menu widget stuck in it too. I did that from the widgets page. It all looks perfect in the dashboard, but the site has the default sidebar, the new sidebar is nowhere to be seen.

    any ideas? I’m all ears.
    thanks for your help.

    Without looking at the code, I’m all out of ideas, but if you’d like to contact me through our site and let me take a look, I’d be happy to do a little troubleshooting.


    Here are the full functions.php, and sidebar.php after suggested mods.

    is there anything else you need? like header.php?

    thanks again

    I copied that code to my setup and everything works perfectly. Do you have any other plugins that affect your sidebars?

    Hi, no, not that I know of.

    WordPress Importer
    WP Google Fonts
    WP Online Store
    WP Photo Album Plus
    WP Simple Paypal Shopping cart

    several these are not activated


    Blazer Six,
    it’s the blog page that is set to shoe an alternate sidebar

    That solves it! Your blog page isn’t really a “page” in the same sense that other pages are since it lists multiple posts and is a little beyond the simple problem this plugin was meant to solve. I’ll see if I can’t come up with a solution to include in a future release, though.

    But for now, in your particular case, you can modify the code in sidebar.php again to include a new check and call the sidebar you setup for your blog section:

    if ( is_home() ) :
    		dynamic_sidebar( 'Blog Sidebar' );
    elseif ( function_exists( 'simple_sidebar' ) ) :
            simple_sidebar( 'primary-widget-area' );
    elseif ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?>

    Just change the “Blog Sidebar” string to whatever you named your blog sidebar.

    Blazer Six,
    Thank You. It finally works. I really appreciate the help!


    Blazer Six,

    Ok, so is this all because of the way I built this site?

    The page we worked on is fine, but that is a start page to get into the blog. All I want is a blog location (page) that can be browsed into different categories, and individual posts and maintain the custom sidebar. Now, if you click off the blog page into a category the default sidebar is there, as well as if you go to individual posts from the category page. I don’t know if this is a plugin issue, or if there is a better way to structure my nav.

    any thoughts? does this make sense? I’m a total noob but I’m not giving up!

    We’ll get you taken care of. Knowing your end goal now, we’re going about this backwards and this plugin will do exactly what you want.

    Your default sidebar (Primary Widget Area) should contain the Custom Menu widget that you currently have in your blog sidebar so that it applies everywhere. Then you would assign your pages (Home, About, Meditation Tips, etc.) a custom sidebar to override the default–you can assign the same sidebar to all of them so you only have to update the widgets in one place.

    You’ll then want to remove the custom sidebar you added to the blog page and change the code in sidebar.php back to the originally suggested snippet:

    if ( function_exists( 'simple_sidebar' ) ) :
    	simple_sidebar( 'primary-widget-area' );
    elseif ( ! dynamic_sidebar( 'primary-widget-area' ) ) : ?>

    Hope that makes sense and gets you what you want.

    Hey thanks!
    I’ll try this later today and let you know.
    I do appreciate your help. Thanks a ton.

    I saw your website. It’s very awesome. Clear, but also shows some humility. I bet your really good at building sites to fit your clients needs.


Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘[Plugin: Simple Page Sidebars] hiding sidebars’ is closed to new replies.