Search page loop: how to test if result is a page?
-
In my search results page on my theme, the category of each post that is turned up by the search is displayed. this is fine. the problem is, if the search finds a match in a Page, then it shows the Page as being posted in “uncategorized” even though pages don’t have categories.
i am trying to figure out a way to test if the current post is a page within the search results loop and not print the category if it is a page.
how would i go about that?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Search page loop: how to test if result is a page?’ is closed to new replies.