Archives and blog page full width


#1

The archives and blog pages display the right sidebar. Is there any way to set archives and blog to full width?


#2

Hello,

Can you please provide a link to your website?

Kind Regards, Roman.


#3

Hi Roman,

Here are the links.

Posts Archives:
https://www.collectionofcards.com/2019/01/

and
Custom Post Types Archives:
https://www.collectionofcards.com/tarot-decks-listings/

Kind regards,
Roxana


#4

Hello Roxana, thank you for the links.

Try to use the following CSS code, then you can use Widget Logic or WooSidebars plugin in order to remove widgets on those archive pages. You can add CSS code in Customize → Additional CSS section.

body.archive div#content {
    margin-right: 0;
}

Please feel free to ask any other questions that you might have.

Kind Regards, Roman.


#5

Hi Roman,
Thank you very much. Now the archive pages are full width. I had to remove the line from archive.php
<?php get_sidebar(); ?>
because the sidebar was visible and overlapping the content. I hope it’s alright to do?
Can we do a similar trick for a blog page as well?
https://www.collectionofcards.com/articles/

Kind regards,
Roxana


#6

Hello Roxana,

It’s okay, but please note that you should override modified .php files in a child theme to avoid losing changes on theme update. Regarding the blog page, you can try to remove that line from index.php file as well.

Kind Regards, Roman.