How to Show Results based on Search Query
-
Currently we are displaying results from a Custom Post Type using a Pods Template
<div class="masonry"> <div class="item"><img src="{@featured_image._img.large}<a href="{@websiteurl}"><h2 class="entry-title">{@post_title}</h2></a>{@post_excerpt}</div> </div>
and shortcode on pages to generate the results,
[pods name="listing" where="listingcategory.name='CategoryName'" template="TemplateName" orderby="RAND()"]
Is it possible to amend this shortcode, so that results show only those listings that include the keyword that a user is searching, in the post_excerpt?
e.g. to generate search results, I would like to amend the shortcode with the following where function:
where post_excerpt. (includes searched keyword) or where post_title. (includes search keyword)
Is that possible and what would be the searched_keyword field and what to use instead of = sign, to express includes!?
- The topic ‘How to Show Results based on Search Query’ is closed to new replies.