php - How to have different logic for a page and a post within Wordpress? -


I am modifying a WordPress template and need to separate the rendering logic for posts and pages, especially The form that renders out the date in the form of the problem is that I am not getting any code to do this, I am sure it exists. Is there a variable that exists in WordPress that tells me whether the item is displayed or a page?

Something like this will appear in an ideal world:

  & lt ;? Php if (is_page ()):? & Gt; Page logic & lt ;? Php else:? & Gt; 

is the type of post, so the different blog posts for page versus normal blog posts should properly return different values.


Comments