Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
  • #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?


    Hey jwt2030!

    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;

    Best regards,


    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;



    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;

    Best regards,


    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.



    I see the error, it was a parenthesis, use this:

    $avia_active_template = "active" == get_post_meta($post_id, "_aviaLayoutBuilder_active", true) ? true : false;



    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;



    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:


Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Template Builder – Blog’ is closed to new replies.