CMS: Displaying Your Blog Posts in a Custom Feed Using a Repeater or Table

4 min read
With the Wix Blog, you get a ready-made blog feed generated for you. But, if you require a little more freedom to customize your feed, such as choosing which elements to show in preview and setting posts to show in chronological order, you can do so using a table or a repeater.
Limitations of custom feeds created with repeaters or tables:
When using this method, site visitors cannot comment on or add likes to blog posts displayed in a custom feed using a repeater or table.
Before you begin:
To use this method, make sure that you've added the following to your site:

Step 1 | Add a repeater or table to the relevant page on your site

A repeater displays your collection using a layout that you can change. For example, you can add another text box, image, or button. A table also displays your collection, but it uses layouts that you cannot change.

To add a repeater or table to the relevant page on your site:

  1. In the Editor, open the page where you want to display your blog feed.
  2. Click Add  on the left side of the Editor.
  3. Click List.
  4. Drag and drop your selected repeater or table onto the page.

Step 2 | Add a dataset to the page (and connect it to the blog post collection)

Repeaters and tables can show items from collections when they are linked via a dataset.
In this step, we add a dataset to associate the repeater or table with the correct collection.

To add a dataset to the page (and connect it to the blog post collection):

  1. Click CMS  on the left side of the Editor.
  2. Click Add Content Elements then click the Add icon  next to Dataset.  
A screenshot of the Add Content Manager panel highlighting the Add Content Elements option
  1. Click the newly added dataset.
  2. Click Settings.
  3. Select Posts from the Connect a collection drop-down.

Step 3 | Connect the table or repeater to the dataset

Connect your repeater or table to the blog posts collection.

To connect the table or repeater to the dataset:

  1. Click your repeater or table in your Editor.
  2. Click the Connect to Data icon .
  3. From the Connect a dataset drop-down, select the Posts dataset.
  4. Link each of the components of your repeater or table to the appropriate fields in the collection. Click the arrow next to each of the components in the repeater or table (text, image etc.) and connect each one to the desired fields in the collection. Note: You can also link an image or button to Post Page URL (URL). This brings the visitor to that blog post when clicked.

  5. Click Preview.

What’s Next?
  • You can control the number of posts being shown using the repeater’s Dataset Settings or the Table Layout.

  • Add a pagination or a load more button to display more blog posts.
  • Adjust the order of your post to show a specific sequence.
  • Create a custom feed displaying blog posts from specific categories. Learn More

Did this help?