WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] how to know if excerpt on search page is page or post?

[Resolved] how to know if excerpt on search page is page or post?

  • in loop.php, how can i test whether the current post being worked on is a Page or a Post? when on a search or tag results page, i want to show post dates only if the result is a Post, but not if it’s a Page.

    i’ve tried is_page() and $wp_query->is_page but can’t get it.

    thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] how to know if excerpt on search page is page or post?’ is closed to new replies.