How to return dates only on posts not pages in search results?
-
I’m trying to write a search.php template that, when returning both pages and posts, would only return the date if the post_type was a post. Otherwise it would do nothing.
I’ve tried using post_class or quest_posts but I couldn’t very far with them. Anyone have any ideas on how I can make this work?
TY.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘How to return dates only on posts not pages in search results?’ is closed to new replies.