Answer the question
In order to leave comments, you need to log in
Why are GET/POST requests not working on WP?
Hello!
I send a search form (GET / POST tried both options) to another page, where, depending on the data received, it displays records (The page has a template installed)
However, with this transition, it shows the main page template
Help me figure it out
Answer the question
In order to leave comments, you need to log in
You can for example like this:
function add_query_vars_filter( $vars ){
$vars[] = "название_переменной";
$vars[] = "название_второй_переменной";
return $vars;
}
add_filter( 'query_vars', 'add_query_vars_filter' );
$var = (get_query_var('название_переменной')) ? get_query_var('название_переменной') : false;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question