How to modify the search results query in WordPress

Prem Tiwari - - WordPress Snippets


If you are using custom post type in your WordPress site to share your content with your users like Movies, Deals, discount, and etc., then keep your close attention in this post as I am going to share how to modify the search results query in WordPress.

How to modify the search results query in WordPress

You can modify the query which fetches the search results during the Loop on the frontend site using the pre_get_posts hook.


Prem Tiwari

Prem Tiwari is the founder of FreeWebMentor.com and also a professional developer and a blogger by hobby.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.