Archived topic
change category color background
16 replies · Started by francesco on January 11, 2022

how can i change the color in the articles area?
Hi there,
Try this CSS:
.archive.separate-containers .page-header {
background-color: #000;
}
Adding CSS: https://docs.generatepress.com/article/adding-css/
Let me know if this helps :)
thnx work.. is there a css to change only the background of the posts?

Try
.archive .inside-article {
background-color: #000;
}
it works, but it just changes the look in the categories section.
.site .inside-article {
background-color: #000;
}
this work in all site.
Is there a way to change the layout of the category pages differently from that of the home?
Hi there,
can you share a link to the page where you want the change to be applied?
I changed the color, through personalization, colors, contents. making it the same as the site's background color. later I used the CSS .site .inside-article {
background color: # 000;
}
to change the color of the post content. this CSS also changed the color of the search content. and I don't want this. how can i solve?
I would also like to understand if it is possible with generatepress prem. + press lock change the collection of posts on category pages.
example photos.
-search content

-my home page

-desired style category page

I had to use CSS to be able to change the background color of the category name content. otherwise it would have looked like in the photo.
i would like only the color of the post area to be different.

I'm having a hard time to understand what you are trying to achieve.
Are you trying to have different color for the blog post background color on archive page?
If so, you can try this CSS instead:
.archive.category .site .inside-article, .blog .site .inside-article{
background-color: #000;
}
For the rest of the site content color, you can set it at customizer > colors > content.
Let me know if I miss anything.
Unfortunately, the aspect of research has also changed with this css.

I'm trying to get a different color for the background of the posts. this on all pages, both the home page and the category page.
for the category page, however, I would also like to change the style as in the photo above.
Edited the CSS here, give it another try: https://generatepress.com/forums/topic/change-category-color-background/#post-2078312
And can you link us to your site? As we are guessing based on screenshots which is not very efficient.
Thanks!
site link https://fehu.it/
-Thanks, this CSS work.
-The problem of setting the category page remains.
I'm trying to make the articles page like in the picture below.

-I created through the elements section a Layout (position: Articles Categories Archives) and also a Content Model Block (position:
Articles Categories Archives). unfortunately it didn't help, only the layout changed.
I think the problem is in the setting i put for the home page.

should i try with these? https://docs.generatepress.com/article/option_generate_blog_settings/?fbclid=IwAR20cVTxJyFmTif08lg4sgH-lu5FjzTvYhSVPLcKBeLTgu1JeHeZlTP3Slc
Hi there,
Remove any Block Elements you have added to your blog page.
Then in Customizer > Layout > Blog disable the Columns option so the default post list is in a single column.
Then follow this document to create a Block Element - Content Template:
https://docs.generatepress.com/article/block-element-content-template/
That block element contains some pre-made templates including one that has the layout you require.
this changes my home page, but I want my home page to stay with columns ( 3 columns). I would like the other archives of pages or categories with a one column.
Ok to change the columns on category archives you will need to add this PHP Snippet:
add_filter( 'generate_blog_get_column_count','tu_search_column_count' );
function tu_search_column_count( $count ) {
if ( is_category() ) {
return 100;
}
return $count;
}