Start here

Post widgets and category blogs

The [embed](/docs/embed) can also show a short list of posts on any page, such as a sidebar or your home page. It can limit the blog list to one category.

Updated 27 October 2026

1 min read

Show one category

Add data-category with the category’s slug to the embed script. The list shows only the posts of that category.

One category

html
<div id="cmskite-blog"></div>
<script src="https://cmskite.com/embed.js" data-blog="YOUR-HANDLE" data-category="news" async></script>

Recent posts

Add data-widget="recent" to show the newest posts as cards. Each card links to the post. It does not open posts or take over the page.

Three newest posts

html
<div id="cmskite-widget"></div>
<script src="https://cmskite.com/embed.js" data-blog="YOUR-HANDLE" data-widget="recent" data-limit="3" async></script>

Add data-category to show recent posts from one category only.

Picked posts

Add data-widget="posts" and data-posts with post slugs, separated by commas. The widget shows them in that order. It shows up to 12 posts.

Two chosen posts

html
<div id="cmskite-widget"></div>
<script src="https://cmskite.com/embed.js" data-blog="YOUR-HANDLE" data-widget="posts" data-posts="first-post,second-post" async></script>

Attributes

AttributeMeaning
data-categoryA category slug. Limits the list, or the recent posts widget, to that category
data-widgetrecent or posts
data-limitHow many recent posts: 1 to 50. The default is 3
data-postsPost slugs, separated by commas, in display order
data-targetThe id of the element to draw in. A widget uses cmskite-widget when you do not set it
data-accentA colour for links and labels
data-langen, pt-BR or es. The language of the words around the posts. The default is your blog’s language