Home › Forums › General Issues › Searching with ACF and the_title() › Reply To: Searching with ACF and the_title()
Hi @nsilva
The ?s= parameter is used by WordPress’ search function so you will get redirected to the search page when you are accessing that URL. You need to use another parameter like “search”, for example, so your link will look like this: http://46.101.2.132/jobs/?job_sector=&job_salary_from=&job_type=&job_location=$search=thekeyword
For the code, you can use something like this:
// update meta query
if( !empty($_GET[ 'search' ]) ) {
$query->set('s', $_GET[ 'search' ]);
}
// update meta query
$query->set('meta_query', $meta_query);
I hope this helps.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.