Widgets & Sidebars in PolyCMS
Widget System Overview
Widgets are modular content blocks that can be placed in theme-defined Widget Areas (sidebars, footer zones, etc.). PolyCMS ships with 9 built-in widgets ready for immediate use.
Built-in Widgets
| Widget | Description |
|---|---|
| Latest Posts | Displays recent blog posts with configurable count |
| Popular Posts | Shows most-viewed posts based on view tracking |
| Categories | Lists all categories with post counts |
| Tags Cloud | Visual tag cloud with weighted sizing |
| Search | Frontend search form for blog content |
| Recent Comments | Latest approved comments with excerpts |
| Archives | Monthly/yearly post archives |
| Custom HTML | Freeform HTML content block |
| Social Links | Social media profile links with icons |
Configuring Widgets
Navigate to Blog > Widgets to manage widget placement:
- Select a Widget Area — Choose from available areas defined by your active theme (e.g., "Blog Sidebar", "Footer Column 1").
- Add Widgets — Drag widgets from the available list into the target area.
- Configure — Click each widget to expand settings:
- Widget title (displayed as heading above widget content)
- Widget-specific options (e.g., number of posts to show, category to filter)
- Reorder — Drag widgets within an area to change display order.
- Save — Click Save to apply changes.
Widget Areas
Widget Areas are defined by your active theme. The default Head Random theme provides:
- Blog Sidebar — Right sidebar on archive and single post pages.
- Footer Widgets — Footer zone across all frontend pages.
Custom themes can register additional Widget Areas. See Building a Custom Theme for implementation details.
Shortcodes
Shortcodes provide an alternative way to embed dynamic content directly inside post or page content using simple bracket syntax.
Available Shortcodes
| Shortcode | Description |
|---|---|
[recent_posts count="5"] | Display latest posts inline |
[post id="42"] | Embed a specific post |
[categories] | Render a category list |
Using Shortcodes
Insert shortcode syntax anywhere in the TinyMCE editor content area. PolyCMS parses and renders shortcodes when the page loads on the frontend.
For creating custom shortcodes, see the Shortcode Development Guide.
Related Documentation
- Theme Management — Themes define available Widget Areas.
- Building a Custom Theme — Register custom Widget Areas.
- Creating Custom Shortcodes — Developer guide for custom shortcode implementation.