Tagged: , ,

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

    Hello,

    I’m having trouble getting widgets to display in the sidebar the way I’d like. There are two issues:

    1) Ordering: There are widgets that I want to display on every page so I use the “Displayed Everywhere” widget option. I also want to display different widgets on the single post pages so I use the “Sidebar Blog” widget option. The problem is that I have no control over the order in which the widgets are displayed. It appears that by default, the “Sidebar Blog” widgets are posted on top of the “Displayed Everywhere” widgets. How can I control the order in which these are displayed?

    2) I’m using the Adrotate plugin to manage my advertisements. The plugin has features that allow you to determine which categories particular ads will be displayed in. Unfortunately, this feature isn’t working with the enfold theme and my advertisements are displaying in every category and on every single post. Is there some way to fix this?

    Thanks!

    #203629

    Hi kls1138!

    1) The order is determined by the code in enfold/sidebar.php. If you want to display the “Displayed Everywhere” widget area on top of the “Sidebar Blog” widget area open up sidebar.php and delete following code

    
            //global sidebar
            if (dynamic_sidebar('Displayed Everywhere')) : $default_sidebar = false; endif;
    
    

    Then replace

    
    
            if($custom_sidebar)
            {
                dynamic_sidebar($custom_sidebar);
                $default_sidebar = false;
            }
    

    with

    
            //global sidebar
            if (dynamic_sidebar('Displayed Everywhere')) : $default_sidebar = false; endif;
    
            if($custom_sidebar)
            {
                dynamic_sidebar($custom_sidebar);
                $default_sidebar = false;
            }
    
    

    2) I’m not familiar with the Adrotate plugin code and I don’t know how you can fix this. Please contact the plugin author – maybe he can provide support for the plugin.

    Regards,
    Peter

    #211975

    Thanks for the code to control the order of the widgets, Peter!

    I contacted the Adrotate plugin author and his response was that the enfold theme is not using the default wordpress widget settings. I’m not sure whether he’s right or not, and it’s not important. I was able to address the issue with a feature from wordpress’s Jetpack plugin called “Widget Visibility” which provides features to control what pages a widget appears on. I just wanted to share this information in case it might help other users.

    Thanks again for your help!!

    #212978

    Hi!

    Glad you found a solution. I don’t know what the plugin author means with ” default wordpress widget settings” (afaik there are no default widhet settings for widget areas) but it’s not important…

    Regards,
    Peter

    #231977

    Hi there,
    This seems to work fine for custom sidebar order – but what about Sidebar Pages – this is still being displayed above the Displayed Everywhere widget.
    As an aside, I’m using Enfold Child, so I’ve simply made the modification to sidebar.php in this theme folder & uploaded, I presume this will overwrite the sidebar.php in the parent theme folder?
    Thanks,
    Jas

    #232107

    Hey!

    Yes, the child theme sidebar.php overwrites the parent theme file. Did you test if the “Displayed Everywhere” widgets are really on top of the “custom sidebar” widgets? The modification I posted here: https://kriesi.at/support/topic/sidebarwidget-issues-2/#post-203629 should place the “Displayed Everywhere” widgets at the very top and maybe the child theme sidebar.php doesn’t load properly on your server.

    Regards,
    Peter

    #232117

    Hey Peter,
    Yes, I can confirm it loads above custom sidebar’s – but not the Sidebar Pages widget.
    Is there anything else I can check?
    Jas

    #232121

    Ok, my apologies, I can also confirm that is does load above Sidebar Pages – but not the Page Sidebar Navigation (which I have checked under Theme Options).
    So I should have been more specific – sorry.
    Can I load the Displayed Everywhere above this too?
    Just looks a bit weird having (in may case the Search) at the top of every page apart from those where the sidebar navigation is present.

    #233117

    Hey!

    Yes, insert this line:

    
    if (dynamic_sidebar('Displayed Everywhere')) : $default_sidebar = false; endif;
    

    below this line

    
    $av_sidebar_menu = avia_sidebar_menu(false);
    

    Cheers!
    Peter

    #234089

    Perfect – thanks.

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘sidebar/widget issues’ is closed to new replies.