Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1310308

    cohen611
    Participant

    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.

    #1310665

    Rue Nel
    Moderator

    Hello 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.

    #1313228

    cohen611
    Participant

    Hi,

    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.

    #1313943

    Jack
    Keymaster

    Hi 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!

    #1316533

    cohen611
    Participant

    Will modifying the native WordPress search also affect the search element in the grids?

    #1317025

    Rue Nel
    Moderator

    Hello 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.