Answer the question
In order to leave comments, you need to log in
What is the problem when querying with custom taxonomies?
I have a section of code where records are requested
$posts = query_posts($args);
print_r($args);
print " number of posts=".count($posts);
Array
(
[paged] => 0
[posts_per_page] => 10
[post_type] => institution
[tax_query] => Array
(
[0] => Array
(
[taxonomy] => institutions
[field] => id
[terms] => Array
(
[0] => 3
)
)
[1] => Array
(
[taxonomy] => country
[field] => name
[terms] => Array
(
[0] => Россия
)
)
[2] => Array
(
)
[3] => Array
(
)
)
[meta_query] => Array
(
[0] => Array
(
)
[1] => Array
(
)
)
[orderby] => date
[order] => DESC
)
Array
(
[paged] => 0
[posts_per_page] => 10
[post_type] => institution
[tax_query] => Array
(
[0] => Array
(
[taxonomy] => institutions
[field] => id
[terms] => Array
(
[0] => 3
)
)
[1] => Array
(
[taxonomy] => country
[field] => name
[terms] => Array
(
[0] => Россия
)
)
[2] => Array
(
[taxonomy] => region
[field] => name
[terms] => Array
(
[0] => Московская область
)
)
[3] => Array
(
[taxonomy] => city
[field] => name
[terms] => Array
(
[0] => Москва
)
)
)
[meta_query] => Array
(
[0] => Array
(
)
[1] =>
)
[orderby] => date
[order] => DESC
)
number of posts=10
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