Skip to content
Available for new work
Pages in Blog

GuidePremium

Blog widgets in CoullWorks Blog for Magento 2

The five blog widgets (Category Tree, Recent Posts, Tags, Monthly Archive and Search Box), how to add one with Magento's widget screen, every Widget Options field, and how to put them in the listing sidebar.

Updated 17 November 2026Back to the package pageBuy

The blog adds five widgets to Magento's widget screen. You can place them on any CMS page, CMS block or layout position, and you can show any of them in a right-hand column on the blog's own listing pages without creating a widget at all.

WidgetWhat it showsDefault heading
Blog: Category TreeThe blog's categories and their children, as linksCategories
Blog: Recent PostsThe newest published posts, with an image and titleRecent posts
Blog: TagsThe blog's tags as linksTags
Blog: Monthly ArchiveMonths that have posts, each with a count, linking to the archive page. The last 12 months with posts are listedArchive
Blog: Search BoxA box that searches the whole store. It is not a blog-only searchSearch

Each widget prints nothing when it has nothing to show, for example the archive on a blog with no published posts. Only posts, categories and tags that the visitor may see are listed.

Add a widget to a page#

  1. Open Content, Elements, Widgets and press Add Widget.
  2. In the Settings step, choose a Type that starts with "Blog:" and the Design Theme the widget is for (the theme your storefront uses). Press Continue.
  3. On Storefront Properties, name the widget, choose the store views it is for and add a layout update that says where it goes (the page and the container). This tab is Magento's own and is the same for every widget.
  4. Open Widget Options and fill in the fields for that widget (below).
  5. Press Save, then flush the cache so the page picks it up.

The Widget Options tab holds only the fields in the sections below. None is required.

Blog: Category Tree#

The Settings step for a new widget with the type Blog: Category Tree and the design theme Magento Luma

Step 2. The Widgets screen with Type set to "Blog: Category Tree" and Design Theme set to Magento Luma, above the Continue button.

The Widget Options tab of the Category Tree widget, with one empty Title field

Step 4. The Widget Options tab has one field, Title, empty.

  • Title. Where: Widget Options. Type: text. Allowed values: any text. Default: empty, which prints the heading "Categories". Validation: none. What it changes: the heading above the list.

Blog: Recent Posts#

The Settings step with the type Blog: Recent Posts

Step 2 with Type set to "Blog: Recent Posts".

The Widget Options tab of Recent Posts with Title empty and Number of posts set to 5

Step 4. Title is empty and Number of posts shows 5.

  • Title. Where: Widget Options. Type: text. Default: empty, which prints "Recent posts". What it changes: the heading above the list.
  • Number of posts. Where: Widget Options. Type: text, a whole number. Default: 5 (pre-filled). What it changes: how many of the newest posts are listed. A value that is empty, zero or not a number falls back to Recent Posts To Show under Sidebar and Rail in the configuration, which is 5 by default.

Blog: Tags#

The Settings step with the type Blog: Tags

Step 2 with Type set to "Blog: Tags".

The Widget Options tab of the Tags widget with one empty Title field

Step 4. One field, Title.

  • Title. Where: Widget Options. Type: text. Default: empty, which prints "Tags". What it changes: the heading above the tag links.

Blog: Monthly Archive#

The Settings step with the type Blog: Monthly Archive

Step 2 with Type set to "Blog: Monthly Archive".

The Widget Options tab of the Monthly Archive widget with one empty Title field

Step 4. One field, Title.

  • Title. Where: Widget Options. Type: text. Default: empty, which prints "Archive". What it changes: the heading above the list of months.

The header search is the store's main search box, and it already finds articles (see Blog search). This widget is for a second box somewhere else. It sends the visitor to the store's normal search results page, not a blog-only page.

The Settings step with the type Blog: Search Box

Step 2 with Type set to "Blog: Search Box".

The Widget Options tab of the Search Box widget with one empty Title field

Step 4. One field, Title.

  • Title. Where: Widget Options. Type: text. Default: empty, which prints "Search". What it changes: the heading above the box.

Show widgets in the listing sidebar#

The home, category, tag, author and archive pages can have a right-hand column of these widgets without any widget being created.

  1. Open Stores, Configuration, CoullWorks, Blog and the Sidebar and Rail group.
  2. In Sidebar Widgets On Blog Listings, select the widgets you want. The list is Category tree, Recent posts, Tags, Archive, and Blog search box. Hold Ctrl or Command to choose several. They are shown in the order of the list above.
  3. If you chose Recent posts, set Recent Posts To Show. It must be a whole number above zero. The default is 5.
  4. Save the configuration and flush the cache.

The Sidebar Widgets On Blog Listings list with its five options

The multi-select with its five entries and the hint under it. This capture is composed to show the whole list expanded, because a real multi-select only shows a few rows.

  • Sidebar Widgets On Blog Listings. Default: nothing selected, so the listings run full width. The blog-only search box is never on unless you pick it.
  • Recent Posts To Show. Default 5. It is the fallback count for the Recent Posts widget, in the sidebar and anywhere a widget is added with no count.

The Recent Posts To Show field showing 5

Recent Posts To Show with its default of 5.

Widget templates can be overridden in your theme like any other blog template. They are widget/category-tree.phtml, widget/recent-posts.phtml, widget/tags.phtml, widget/archive.phtml and widget/search.phtml; see Layout and templates.

Available for new work

UK based · PHP · Python · JS · TS. Every first call is free.