Skip to content

Function to filter a query to show only posts which have a relationship — any relationship #101

@benlk

Description

@benlk

Is your enhancement related to a problem? Please describe.

A blog has posts. Some, but not all, of those posts use WP Content Connect to associate the post with an author. They're essentially opinion pieces.

We'd like to limit a Post Query Loop block (or just a plain WP_Query) to only those posts that have a relationship within a specific relationship type. It doesn't matter which other post they're related to, just that they have any relationship at all.

Designs

No response

Describe alternatives you've considered

The simpler alternative, which we're going with for now, is to ask that all posts with that relationship also get tagged with a specific tag.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions