• Wordpress
  • How to show blank search on wordpress

    By default, wordpress do not search for blank. It redirects to the home page for blank search. To prevent this we can use pre_get_posts hook. We can use pre_get_posts action to manipulate the query variables for specific pages. We can modify $wp_query object before any results are returned. In this example, we are using pre_get_posts […]