Tagged: x
-
AuthorPosts
-
December 30, 2016 at 3:49 pm #1310308
If I’m not mistaken, the built in search from searches for post titles and content only. Is there a way to also be able to search author name and categories?
Thanks.
December 30, 2016 at 10:13 pm #1310665Hello There,
Thanks for writing in!
If you’d prefer to let a WordPress plugin handle the work for you, check out Search Everything (http://wordpress.org/extend/plugins/search-everything/), in the WordPress plugin repository.
Perhaps this article could also help you:
https://premium.wpmudev.org/blog/improving-wordpress-search/Hope this helps.
January 2, 2017 at 3:15 pm #1313228Hi,
Yes, using a plugin is definitely an option.
But I was hoping for a solution within the grid since it will fit better with my website’s design. Is there a function I could add or something?
Thanks.
January 3, 2017 at 5:07 am #1313943Hi there,
Personally I’d recommend using a search plugin in most cases. Customizing the default WordPress search is advanced. It’ll be extremely easy to write a query that causes slowdown with an ineffective search on the DB/that is resource intensive.
If you’d still like to add custom functionality to the search through code, you may find this tutorial useful https://www.smashingmagazine.com/2016/03/advanced-wordpress-search-with-wp_query/ it explains the core of what needs to be done and goes through creating a custom search for a custom WP_Query.
Thank you!
January 4, 2017 at 5:45 pm #1316533Will modifying the native WordPress search also affect the search element in the grids?
January 5, 2017 at 2:04 am #1317025Hello There,
Thanks for updating in! The search in the grids is done by the grid plugin. Most of it will be done with AJAX and all of these is custom coded within the grid plugin. The grid search does a different way compare to how WordPress search works for posts and contents.
Hope this helps.
-
AuthorPosts