thank you for the answer!
i’ve added the ИНН field to the [adverts_list] form:
add_filter( 'adverts_form_load', 'search_by_INN' );
function search_by_INN( $form ) {
if( $form['name'] != 'search' ) {
return $form;
}
$form['field'][] = array(
"name" => "query",
"type" => "adverts_field_text",
"order" => 10,
"label" => "",
"placeholder" => __("ИНН ...", "adverts"),
"meta" => array(
"search_group" => "visible",
"search_type" => "half"
)
);
return $form;
}
but i don’t understand how i can modify the code below:
add_filter( 'adverts_list_query', 'search_by_INN_query' );
function search_by_INN_query( $args ) {
if( ! adverts_request( "advert_category" ) ) {
return $args;
}
$args["tax_query"] = array(
array(
'taxonomy' => 'advert_category',
'field' => 'term_id',
'terms' => adverts_request( "advert_category" ),
),
);
return $args;
}
besides it looks like the search form stopped working in general https://xn—-8sbafhjd1b1adcehode7af3p.xn--p1ai/?page_id=88