[Resolved] Background Colour of Archive, Blog, Search vs Blog Posts

Home Forums Support [Resolved] Background Colour of Archive, Blog, Search vs Blog Posts

Home Forums Support Background Colour of Archive, Blog, Search vs Blog Posts

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #2388398
    Ian

    I would like to keep the background colour of Blog Posts to be grey. Running the new Query Loop to control archive template using Loop Content and now would like Archive, Blog, Search background colours to be white. Is there custom CSS that I can run for this?

    #2388417
    Ian

    I think these work for the archive and and blog sections. What about the search results section?

    body.archive,
    body.archive #page,
    body.blog,
    body.blog #page
    {
    background-color: #ffffff;
    }

    #2388474
    Leo
    Staff
    Customer Support

    Hi there,

    body.search-results would target the search results page.

    You can always identify the unique tag by looking at the classes in the <body>:
    https://www.screencast.com/t/vbF7hJemB

    #2388487
    Ian

    Awesome thank you Leo. May I ask if we need the #page as well?

    body.search-results, body.search-results #page

    Seems to work without the #page line.

    #2388502
    Leo
    Staff
    Customer Support

    May I ask if we need the #page as well?

    That completely depends on what you are targetting.

    #2388506
    Ian

    In short, I want archives, blog page and search results to show a white background. I found the #page reference on this ticket: https://generatepress.com/forums/topic/content-block-archive-background-color/

    Is this enough with the #page references?

    body.archive, body.blog, body.search-results
    {
    background-color: #ffffff;
    }

    #2388520
    Leo
    Staff
    Customer Support

    If this works for you:

    body.archive, body.blog, body.search-results
    {
    background-color: #ffffff;
    }

    Then you don’t need #page.

    You can always try both versions to see the differences.

    #2388524
    Ian

    As always, thanks Leo!

    #2388526
    Leo
    Staff
    Customer Support

    No problem 🙂

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.