• I’ve searched all over trying to find a simple function that will let me know if one of the posts returned from inside the loop is either a WordPress “page” or a “post”. is_page() doesn’t work, because that only works if the entire page you’re viewing is the content of a WordPress “page”.

    What I’m trying to do exactly is this: My search results page displays both “pages” and “posts”, which is good. However, each of the “pages” shows that it’s posted in the “Uncategorized” category. Instead of saying that, I want a function to determine if it’s a “page” type, and have it show some different text rather than the category list.

    Can someone please help me? Thanks in advance.

Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Function for inside the loop to determine if a post is a “page” type?’ is closed to new replies.