Using wp_query to search excerpt

322 views
Skip to first unread message

relish27

unread,
Dec 22, 2014, 2:16:16 PM12/22/14
to mpls-stpau...@googlegroups.com
Is this possible? I would have thought it would be... but I'm not seeing it.  There doesn't appear to be a way to search by the post_excerpt in the wp_query documentation (http://codex.wordpress.org/Class_Reference/WP_Query).  

I am using the "s" search parm and in this case was thinking it was also searching the excerpt.  But it's not. So then I thought I could just add the excerpt in my wp_query filter. But I'm not seeing how.

Am I just missing something simple?  Or is this just not possible with wp_query?

Nick Ciske

unread,
Dec 22, 2014, 2:24:18 PM12/22/14
to mpls-stpau...@googlegroups.com
Search Everything does it, so it must be possible:

Use that, or look at the source code to find out the secret sauce ;-)

_________________________
Nick Ciske
VP Web Engineering
@nciske

Courtney Remes

unread,
Dec 22, 2014, 4:36:27 PM12/22/14
to mpls-stpau...@googlegroups.com

Yep, I've used that for normal searches, but this is a more custom scenario. Guessing maybe they use their own sql query,  which I could do but wanted to use wp_query  if I could.

- via phone

--
You received this message because you are subscribed to the Google Groups "Minneapolis St. Paul WordPress User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mpls-stpaul-word...@googlegroups.com.
To post to this group, send email to mpls-stpau...@googlegroups.com.
Visit this group at http://groups.google.com/group/mpls-stpaul-wordpress.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages