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?
Unique Sidebars Issue
10 posts from 5 voices-
Posted 5 months ago #
-
Hi,
Go to Appearance > Widget and supply the newly create unique sidebars with its own widgets.
Regards,
IsmaelPosted 5 months ago # -
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.
Posted 5 months ago # -
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;Posted 5 months ago # -
Thank you, Dude. I will try this and see how it works.
Posted 5 months ago # -
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
Posted 5 months ago # -
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.
Posted 5 months ago # -
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;Posted 5 months ago # -
Dude - Thank you! This made it work perfectly!
Posted 5 months ago # -
Hi Studio1023,
Glad that Peter helped you. :)
Cheers,
IsmaelPosted 5 months ago #
Reply
You must log in to post.














