Skip to content

Filtering posts by attributes such as text, postType etc #19

@jamesmacwhite

Description

@jamesmacwhite

What are you trying to do?

Just putting this as a potential feature request. I had a recent scenario where we wanted to filter out some Instagram post content from our feed, because some lacked any post text attribute value, this wasn't an issue with the API/plugin but the post itself made more sense on the Instagram platform, but displaying on our website with no context didn't make much sense.

The craft.socialFeeds.getPosts() variable has an options parameter but I think it only has limit and offset to use here.

It would be nice to be able to filter the API response data by post attributes before setting a limit.

While this can be done through Twig before displaying, it does mean by doing additional filtering after any original limit set may need to be padded, given the filtered results may go below the original limit critiera depending on what is filtered out.

What's your proposed solution?

Ability to filter a feed by one or more post attributes defined in the post model.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions