[Support request] change category color background

Home Forums Support [Support request] change category color background

Home Forums Support change category color background

Viewing 15 posts - 1 through 15 (of 17 total)
  • Author
    Posts
  • #2077237
    francesco

    category

    how can i change the color in the articles area?

    #2077246
    Leo
    Staff
    Customer Support

    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 🙂

    #2077288
    francesco

    thnx work.. is there a css to change only the background of the posts?

    #2077365
    Leo
    Staff
    Customer Support

    Try

    .archive .inside-article {
        background-color: #000;
    }
    #2077670
    francesco

    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?

    #2077890
    David
    Staff
    Customer Support

    Hi there,

    can you share a link to the page where you want the change to be applied?

    #2078170
    francesco

    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

    #2078182
    francesco

    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.

    #2078312
    Ying
    Staff
    Customer Support

    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.

    #2078410
    francesco

    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.

    #2078417
    Ying
    Staff
    Customer Support

    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!

    #2079017
    francesco

    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

    #2079047
    David
    Staff
    Customer Support

    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.

    #2079347
    francesco

    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.

    #2079453
    David
    Staff
    Customer Support

    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;
    }
Viewing 15 posts - 1 through 15 (of 17 total)
  • You must be logged in to reply to this topic.