Hide promo box from all but homepage


#1

Exactly what it says on the tin!
I’d like to display the under-header promo boxes just on my homepage, but not on products, categories or posts. I’m guessing there’s a custom css workaround for this?

thanks!


#2

Hello there,

Apply custom css code below in order to display promo boxes just on home page:

body:not(.home) .header-promo {
    display: none;
}

You can apply the code from child theme style.css or you can use this plugin https://wordpress.org/plugins/simple-custom-css/

All the Best!


#3

Brilliant! I thought there would be an easy way to do it with css, I just couldn’t figure it out.

Thanks!


#4

You’re welcome,

All the Best!