I have my posts using this code :
$dataQuery = [
'numberposts' => -1,
'post_type' => 'documentation',
'meta_query' => $meta_query,
];
$documentations = get_posts($dataQuery);
Where $meta_query
is an array. It's working, I have my posts, but I want to show a tree with the categories and the posts inside ? Is it possible easily ?
For now, I will get my categories and loop over them and then get posts for each category... Since get_posts()
doesn't return any information about the category. I guess there is a better way ?
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744704881a4588996.html
评论列表(0条)