Skip to content

Issue with filtering post results from get_all_grouped_by_term() #148

@rbhensley

Description

@rbhensley

https://www.coniferplug.in/posts.html#filtering-the-posts-in-each-group

Expected to get all posts grouped by the TAX_RECGROUP taxonomy and filter down the results in each group to a different taxonomy. What I got was each TAX_RECGROUP had all posts from the TAX_RECCAT, 2 groups of the same posts

$recs = Recommendation::get_all_grouped_by_term(
    Recommendation::TAX_RECGROUP,
    [],
    [
        'posts_per_page' => -1,
        'tax_query' => [
            [
                'taxonomy' => Recommendation::TAX_RECCAT,
                'field'    => 'term_id',
                'terms'    => [ $term->ID ]
            ],
        ]
    ]
);

Conifer Version 0.9.0
Timber Version 1.19.1

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions