Tagged: sidebar
I would like to add specific sidebar to the Custom Archive and Taxonomy.
I can see this topic https://kriesi.at/support/topic/problem-with-sidebar-on-archive-page/ but this code is no more http://pastebin.com/9kWRHt9C
So can you please let us know.
Thanks
M
Hi ppcinc!
Thank you for using the theme!
Please create a custom sidebar on Appearance > Widgets. Name it “Archive Sidebar” for example. Edit archives.php, find this code on line 78:
//get the sidebar
$avia_config['currently_viewing'] = 'blog';
get_sidebar();
Replace it with:
//get the sidebar
echo '<aside class="sidebar sidebar_right three alpha units" role="complementary" itemscope="itemscope" itemtype="https://schema.org/WPSideBar"><div class="inner_sidebar extralight-border">';
dynamic_sidebar('Archive Sidebar');
echo '</div></aside>';
Make sure that the name of the custom widget area is Archive Sidebar.
Regards,
Ismael
Great Ismael,
It works perfectly fine, but may i know how can we display “Displayed Everywhere widget” within this ? as i can see the “Displayed Everywhere widget” is no more after this archive sidebar.
Thanks
Mike
Well i think i figured out by:
`echo ‘<aside class=”sidebar sidebar_right three alpha units” role=”complementary” itemscope=”itemscope” itemtype=”https://schema.org/WPSideBar”><div class=”inner_sidebar extralight-border”>’;
dynamic_sidebar(‘Displayed Everywhere’);
dynamic_sidebar(‘ Archive Sidebar’);
echo ‘</div></aside>’;`
Thanks
Mike