Tagged: ,

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #18582

    I’ve created a unique sidebar for a page, but content for the global sidebar still appears in it. How do I keep the general sidebar content out of unique sidebars?

    #100026

    Hi,

    Go to Appearance > Widget and supply the newly create unique sidebars with its own widgets.

    Regards,

    Ismael

    #100027

    There were 3 widgets in it already. My point is that the “Displayed Everywhere” widgets are still appearing in the unique sidebar. I have 3 widgets in the sidebar, but 6 are appearing.

    I need to know how to keep “Displayed Everywhere” widgets from appearing in unique sidebars.

    #100028

    The “Displayed Everywhere” sidebar will be displayed on all pages by default. You can try to change the code in sidebar.php though – open up the file and replace:

    // general pages sidebars
    if ($avia_config['currently_viewing'] == 'page' && dynamic_sidebar('Sidebar Pages') ) : $default_sidebar = false; endif;

    with:

    // general pages sidebars
    if ($avia_config['currently_viewing'] == 'page' && dynamic_sidebar('Sidebar Pages') ) {
    $default_sidebar = false;
    $page_sidebar = true;
    }

    and:

    if (function_exists('dynamic_sidebar') && $avia_config['currently_viewing'] != 'shop_single' && dynamic_sidebar('Displayed Everywhere')) : $default_sidebar = false; endif;

    with:

    if (function_exists('dynamic_sidebar') && $avia_config['currently_viewing'] != 'shop_single' && !empty($page_sidebar) && dynamic_sidebar('Displayed Everywhere')) : $default_sidebar = false; endif;

    #100029

    Thank you, Dude. I will try this and see how it works.

    #100030

    Hi heatherpaige,

    Additionally, you can look into using a plugin like: http://wordpress.org/extend/plugins/widget-logic-visual/

    Which will allow you to easily use the wordpress conditional tags to specify where widgets should be displayed.

    Regards,

    Devin

    #100031

    I tried this work around but it didn’t fix the problem. I’m having the same issue. I created a new sidebar and need certain information to display in that sidebar on the selected page…. however all of the other widgets from the “Page Sidebar” is seen as well. Please help fix this error.

    #100032

    In this case delete following code in sidebar.php:

    $custom_widget_area = avia_check_custom_widget('page');

    //unique Page sidebars:
    if (function_exists('dynamic_sidebar') && dynamic_sidebar('Page: '.$custom_widget_area) ) : $default_sidebar = false; endif;

    and replace:

    // general pages sidebars
    if ($avia_config['currently_viewing'] == 'page' && dynamic_sidebar('Sidebar Pages') ) : $default_sidebar = false; endif;

    with:

    $custom_widget_area = avia_check_custom_widget('page');

    //unique Page sidebars:
    if ( function_exists('dynamic_sidebar') && dynamic_sidebar('Page: '.$custom_widget_area) ) {
    $default_sidebar = false;
    $page_sidebar = true;
    }

    // general pages sidebars
    if ($avia_config['currently_viewing'] == 'page' && empty($page_sidebar) && dynamic_sidebar('Sidebar Pages') ) : $default_sidebar = false; endif;

    #100033

    Dude – Thank you! This made it work perfectly!

    #100034

    Hi Studio1023,

    Glad that Peter helped you. :)

    Cheers,

    Ismael

Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Unique Sidebars Issue’ is closed to new replies.