Answer the question
In order to leave comments, you need to log in
Why is the FacetWP request not working correctly?
Hello. I'm using the facetwp plugin for custom post filtering and sorting.
The code is the following:
<?php
$term_query = get_term_by( 'slug', get_query_var( 'term' ), 'tours_locations' );
return array(
'post_type' => 'tours',
'publish' => true,
'posts_per_page' => 50
'tax_query' => array(
array(
'taxonomy' => 'tours_locations',
'field' => 'slug',
'terms' => $term_query->slug,
),
)
);
$term_query->slug
array(
'taxonomy' => 'tours_locations',
'field' => 'slug',
'terms' => 'russia',
),
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question