Support

Account

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.