title: WordPress: How can I check if a search result is a post of a page?
body: <p>In my search archive view, some of the results will be posts, and some will be pages. I want to give posts and pages different visual treatments in the template. </p>
  
  <p>I've tried using if (is_post()) and if (is_page()) with no luck. How can I accomplish this?</p>