It is brief: what function can one use to differentiate between regular posts and occasional pages in search results? I need to treat them differently.
Apologies if it's been asked before.
It is brief: what function can one use to differentiate between regular posts and occasional pages in search results? I need to treat them differently.
Apologies if it's been asked before.
What exactly do you mean?
Do you mean if you do a search on your WordPress site and it returns the results being both posts and pages you want to differentiate between the two on the search results page?
Yep.
Never mind. get_post_type() actually suffices.
This topic has been closed to new replies.