I need to hide some elements in my posts pages, but not in all the other normal pages. Now they appear in all my Wordpress site (single post, page, etc).
How can I hide by CSS an element? This element has a single class <div class="frame-content"
.
Can I do something like: if <post> then .frame-content{display:none;}
?
I need to hide some elements in my posts pages, but not in all the other normal pages. Now they appear in all my Wordpress site (single post, page, etc).
How can I hide by CSS an element? This element has a single class <div class="frame-content"
.
Can I do something like: if <post> then .frame-content{display:none;}
?
This worked for me:
<?php if( is_single() ) : ?>
<style id="my-internal-css">
.frame-content {
display: none !important;
}
</style>
<?php endif; ?>
You can use post specific classes related to body. for example:
body.single-post .frame-content{display:none;}