As the title says I want to keep images on pages and hide them from posts on my site . How can I do this? Thanks
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
You can do this with a css solution. Pages and posts have different
|
|||||||
|
|
I suppose that you could check whether your "Post Type" is a Page or a Post using this function ( link to the Codex at Post Types ) Also this function will come in handy to get the current post type: get_post_type, doc here Edit: The CSS Solution of m0r7if3r is also elegant. But is the image actually loading ( by the browser ) with display:none ? Meaning that if it is loaded, the website will become heavier for something not visible. But I'm not sure about the behavior of image loading with css display:none. Any thought on that? |
|||
|
|