At our website homepage we have a search bar which is placed using a shortcode. Now the search works but the issue is it doesn't search the specific course but renders the list of all course with us.
The issue is when the form submits the parameters passed in the url are "http://www.skillofy.com/?post_type=course&search=book+keeping&s="
As you can see an extra parameter "s" adds up automatically from nowhere which changes the query. Now the correct url parameters should be "http://www.skillofy.com/?post_type=course&search=book+keeping"
Now I have searched everywhere I don't know how this adds up.
Moreover, I need to make this search more powerful where I would like to search not just for post_title but its author, instructor etc using sql "like" and then shows the result.
The issue is I cannot find the file in which the search query is written so that I can modify it. I did try to find it in query.php but it was useless.
Please help fix the search box asap as its on homepage and users will not get their desired result.
Website : www.skillofy.com
Regards
Skilofy Tech Team
Please note that the [course_search] use the wordpress default search for searching purpose by refining the seach upto the post_type=course .
SO its query is nit in the theme but in the wordpress files itself .
You can create a custom search if you want to or can use third party plugins for this .
Also note here that wordpress default search only the value given in the parameter " s " .
And in your site the s parameter left blank and search parameter takes up the value in that input type .
This is why your seach is not working it seems you have again defined your custom course_search shortcode or this may be due to third party plugins .
I prefer to focus on the " s " parameter to make the search work again .
refer :
http://prntscr.com/98kkb0