How to order search results so a specific page appears first when user searches for a particular word?
You need to be reading the search parameter from the URL. By default WordPress uses the parameter s to store the search results. So you’d need to do something like: $user_search = ( isset( $_REQUEST[‘s’] ) ? ‘*’ . wp_unslash( trim( $_REQUEST[‘s’] ) ) . ‘*’ : false ); if ( false != $user_search ) … Read more