Viewing 15 replies - 1 through 15 (of 17 total)
  • turiyamoore

    (@turiyamoore)

    I’m in 2010 theme and this is not working. any thoughts?

    Blazer Six

    (@blazersix)

    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.

    turiyamoore

    (@turiyamoore)

    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]

    Blazer Six

    (@blazersix)

    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.

    turiyamoore

    (@turiyamoore)

    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.

    Blazer Six

    (@blazersix)

    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.

    https://www.blazersix.com/contact/

    turiyamoore

    (@turiyamoore)

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

    https://pastebin.com/u/turiyamoore

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

    thanks again

    Blazer Six

    (@blazersix)

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

    turiyamoore

    (@turiyamoore)

    Hi, no, not that I know of.

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

    several these are not activated

    ?

    turiyamoore

    (@turiyamoore)

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

    https://joyiswithinyou-org.anandagrassvalley.org/

    Blazer Six

    (@blazersix)

    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.

    turiyamoore

    (@turiyamoore)

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

    Peace,
    turiya

    turiyamoore

    (@turiyamoore)

    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.
    samples:
    https://joyiswithinyou-org.anandagrassvalley.org/blog/category/spirituality/

    https://joyiswithinyou-org.anandagrassvalley.org/blog/intuition-and-its-development/

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

    Blazer Six

    (@blazersix)

    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.

    turiyamoore

    (@turiyamoore)

    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.

    https://www.blazersix.com/

    turiya

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