Sidebar for Blog Archive Page

Hi Themeco Gurus
I have a website that is showing a Blog page called News & Stories:
https://allweneedisrighthere.com.au/news-stories/
I have assigned a Sidebar which lists latest Posts and also an Archive list.
The Sidebar is correctly displayed on the Blog List page as well as the individual blog posts.
However, on the Archive page -

**When “March 2018” Archive is clicked on … the sidebar is different. **
How do I have this March 2018 Archive page have the same Sidebar as displayed on the Blog page?

I appreciate your assistance.
Cheers
Deb

Hi Deb,

Thank you for writing in, did you create a new sidebar and used it as the Blog Index Page sidebar? Please disable that and use only the Main Sidebar to have the same sidebar sitewide.


Cheers!

Hi … thanks for reply.
Yes, I did that. Hence it shows well on Blog List page and individual posts page. … But not on the Blog Archive page …

Hi,

To assign a sidebar to your date archive page.

You can add this in your child theme’s functions.php

function assign_my_sidebar($sidebar){

        if (is_date() ){
             return 'ups-sidebar-news-stories';        
         }
  return $sidebar;
}
add_filter( 'ups_sidebar', 'assign_my_sidebar');

Hope this helps

That’s great … worked for me.
Thanks very much for your assistance. Cheers

You’re more than welcome, glad we could help.

Cheers!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.