-
AuthorPosts
-
September 17, 2014 at 1:31 pm #320469
Hello,
I read this post: https://kriesi.at/support/topic/sidebarwidget-issues-2/
because I want to place the contents of the ‘displayed everywhere’ widget above post and page widget data. However, it’s an older post and I cannot find the string that was mentioned to be deleted.
Thanks
Andrew
September 18, 2014 at 7:08 am #320920Hey awilson3rd!
Thank you for using Enfold.
Find this code on line 71 of sidebar.php:
//global sidebar if (dynamic_sidebar('Displayed Everywhere')) : $default_sidebar = false; endif;
Then go look for this code on line 44:
if($custom_sidebar) { dynamic_sidebar($custom_sidebar); $default_sidebar = false; }
Replace it with this code:
//global sidebar if (dynamic_sidebar('Displayed Everywhere')) : $default_sidebar = false; endif; if($custom_sidebar) { dynamic_sidebar($custom_sidebar); $default_sidebar = false; }
Cheers!
IsmaelSeptember 18, 2014 at 10:00 am #321041Thanks Ismael, I’ll give it a go.
Andrew
September 18, 2014 at 1:55 pm #321171September 18, 2014 at 3:45 pm #321250Hello,
I’m not sure if I am doing this right? I have added this:
//global sidebar
if (dynamic_sidebar(‘Displayed Everywhere’)) : $default_sidebar = false; endif;if($custom_sidebar)
{
dynamic_sidebar($custom_sidebar);
$default_sidebar = false;
}But now the default does come first (which is what I want) then the custom sidebar but then the default again.
To be honest I was a bit confused with Ismael’s reply:
Find this code on line 71 of sidebar.php:
//global sidebar
if (dynamic_sidebar(‘Displayed Everywhere’)) : $default_sidebar = false; endif;What do I do when I find the above code?
Thanks
Andrew
September 18, 2014 at 3:52 pm #321256Got it, I added the following to line 44
//global sidebar
if (dynamic_sidebar(‘Displayed Everywhere’)) : $default_sidebar = false; endif;if($custom_sidebar)
{
dynamic_sidebar($custom_sidebar);
$default_sidebar = false;
}Then deleted this on line 91:
//global sidebar
if (dynamic_sidebar(‘Displayed Everywhere’)) : $default_sidebar = false; endif;It works but is that correct?
Thanks
Andrew
-
AuthorPosts
- The topic ‘Sidebar Widgets’ is closed to new replies.