-
AuthorPosts
-
December 24, 2013 at 6:26 am #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!
December 28, 2013 at 11:44 am #203629Hi 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,
PeterJanuary 19, 2014 at 7:23 pm #211975Thanks 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!!
January 21, 2014 at 9:54 pm #212978Hi!
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,
PeterMarch 4, 2014 at 2:58 am #231977Hi 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,
JasMarch 4, 2014 at 9:53 am #232107Hey!
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,
PeterMarch 4, 2014 at 10:06 am #232117Hey Peter,
Yes, I can confirm it loads above custom sidebar’s – but not the Sidebar Pages widget.
Is there anything else I can check?
JasMarch 4, 2014 at 10:10 am #232121Ok, 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.March 6, 2014 at 9:52 am #233117Hey!
Yes, insert this line:
if (dynamic_sidebar('Displayed Everywhere')) : $default_sidebar = false; endif;
below this line
$av_sidebar_menu = avia_sidebar_menu(false);
Cheers!
PeterMarch 8, 2014 at 5:34 am #234089Perfect – thanks.
-
AuthorPosts
- The topic ‘sidebar/widget issues’ is closed to new replies.