September 19, 2013 at 11:05 pm #163779
Hello, when i use the blog section in the template builder, it always adds the blog widgets on top of the normal page widgets. Is there any way to stop this effect?September 20, 2013 at 9:51 am #163976
Try following – open up sidebar.php and replace
// general blog sidebars if ($avia_config['currently_viewing'] == 'blog' && dynamic_sidebar('Sidebar Blog') ) : $default_sidebar = false; endif;
// general blog sidebars $avia_active_template = ('active' == get_post_meta($post_id, '_aviaLayoutBuilder_active', true) ? true : false; if ($avia_config['currently_viewing'] == 'blog' && dynamic_sidebar('Sidebar Blog') && !$avia_active_template) : $default_sidebar = false; endif;
PeterSeptember 21, 2013 at 9:35 pm #164543
Hello, thank you greatly for your update. But when i tried with the above code none of my sidebars would show.
Also i get a syntax error on this line below
$avia_active_template = (‘active’ == get_post_meta($post_id, ‘_aviaLayoutBuilder_active’, true) ? true : false;September 24, 2013 at 5:15 am #165466
It’s a quote issue, replace the quotes by simple or double quotes.
$avia_active_template = ("active" == get_post_meta($post_id, "_aviaLayoutBuilder_active", true) ? true : false;
JosueSeptember 24, 2013 at 6:07 am #165486
Hello, i replaced the code and i am still getting an error in dreamweaver and the sidebar will not show up.
I have uploaded a file so you can inspect.
portalcybermall.com/sidebar.txtSeptember 24, 2013 at 6:49 am #165491
I see the error, it was a parenthesis, use this:
$avia_active_template = "active" == get_post_meta($post_id, "_aviaLayoutBuilder_active", true) ? true : false;
JosueSeptember 24, 2013 at 8:16 am #165496
Hello, the sidebars are showing up now, but the pages are still showing the widgets from the blog sidebar.
I tried to refresh the cache
Does any of this code need to be changed
if ($avia_config[‘currently_viewing’] == ‘blog’ && dynamic_sidebar(‘Sidebar Blog’) && !$avia_active_template) : $default_sidebar = false; endif;September 25, 2013 at 6:56 am #165941
WordPress sidebars stack. So if you have widgets in display everywhere, they display ever. If you have them in Blog but you also have the blog on a page then both will show (because a blog element is on a page).
You can use this plugin to keep specific widgets off of pages with WordPress conditional code: http://wordpress.org/extend/plugins/widget-logic/
The topic ‘Template Builder – Blog’ is closed to new replies.