Reference

Feed

A feed combines the posts from one or more sources so you can show them together. Whenever you’re dealing with a feed in your template, you’re working with a Feed object. Fetch one by its handle, then loop over its sources.

{% set feed = craft.socialFeeds.getFeedByHandle('homepage') %}

{% for source in feed.getSources() %}
    {{ source.name }}
{% endfor %}

To show a feed’s posts, use craft.socialFeeds.getPosts('homepage') as described in Displaying Feed Posts.

Properties

id

The ID of the feed.

name

The name of the feed, as shown in the control panel.

handle

The handle of the feed, used to fetch it and its posts in templates.

enabled

Whether the feed is enabled. A disabled feed returns no posts.

sources

The IDs of the sources included in the feed. Use getSources() to get the source objects.

dateCreated

The date the feed was created.

dateUpdated

The date the feed was last updated.

uid

The feed’s unique identifier, used in project config.

Methods

getSources()

Returns the Source objects included in the feed. Sources that no longer exist are left out.