WordPress.org

Ready to get started?Download WordPress

Forums

Customizr
[resolved] How to modify style.css for Front page only (7 posts)

  1. petergmtl
    Member
    Posted 6 months ago #

    Hi,

    I have made a few changes to style.css that affect the entire site (www.3saccounting.com). How would I go about modifying style.css further so that one (or more) of the changes does not affect the Front Page?

    Thanks

    Peter

  2. salsaturation
    Member
    Posted 6 months ago #

    Hi Peter

    You can use

    body.home

    Infront of the css code eg

    body.home .some-div {
    display: none;
    }

    Also you can do something like this

    body:not(.home) .some-div {
    display: none;
    }

    to affect everything other than the home

  3. Andrew
    Forum Moderator
    Posted 6 months ago #

    You're referring to your Child Theme style.css file?

  4. petergmtl
    Member
    Posted 6 months ago #

    @Andrew - yes, Child Theme - forgot to mention that.

    @salsaturation - thanks, I'll give your suggestion a try.

    Cheers

    Peter

  5. petergmtl
    Member
    Posted 6 months ago #

    @salsaturation

    Your suggestion worked - thanks! You saved me a lot of time.

    Peter

  6. salsaturation
    Member
    Posted 6 months ago #

    You're welcome.

  7. ElectricFeet
    Member
    Posted 6 months ago #

    @salsaturation Neat! Thanks!

Reply

You must log in to post.

About this Theme

About this Topic