build child and anchestor three from post parent


I’m trying to build a three menu from a custom post type, and wanna build a complet three from the posts children and parents, with all levels both up and down included.

And actually the function wp_list_pages()does that really great, and actually includes all levels that i want.

But i also want to modify the query a little, and exclude some post that fits within a meta query, that i’m using another place like this:

$meta_query[] = array(
    'relation' => 'or',
        'key' => 'rank',
        'compare' => '<=',
        'type' => 'NUMERIC',
        'value' => 100,
        'key' => 'rank',
        'compare' => 'NOT EXISTS',
        'value' => 1,

The only problem is that wp_list_pages() don’t support the meta_query, and only looking for at specific meta key and value.

Does anybody have a solution for this, or an idea to archive the goal?

bymem 3 months 0 Answers 14 views 0

Leave an answer