Identify if it is blog and hide div - Wordpress

0

I put a div called "image_top" and I want it to have the display: none property when it is the blog page, woocommerce product or post. I have already tried putting in functions.php, header.php, page.php and nothing works. What am I doing wrong and where should I put the code?

Follow function:

function hidediv() {
if(is front_page() && is_home() || is_single() || is_product() ) {
        document.getElementsById("imagem_topo").style.display='none';
}
    
asked by anonymous 30.10.2017 / 15:21

0 answers