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 (9 Classes)
| Widget | Class File | Description |
|---|---|---|
| Latest Posts | Latest_Posts_Widget.php | Displays recent blog posts with thumbnails, post date, and configurable item count (1 - 20) |
| Popular Posts | Popular_Posts_Widget.php | Ranks and displays most-viewed posts based on total views count |
| Categories | Categories_Widget.php | Lists categories as hierarchical tree or flat list with post count badges |
| Tags Cloud | Tags_Cloud_Widget.php | Visual tag cloud with proportional font sizing based on tag usage frequency |
| Archive | Archive_Widget.php | Monthly/yearly breakdown of published articles with dropdown or list format |
| Author Bio | Author_Widget.php | Displays author avatar, biography text, and social profile links |
| Live Search | Search_Widget.php | AJAX-powered live search bar with instant dropdown search results |
| Custom HTML | Custom_HTML_Widget.php | Raw HTML, CSS, JavaScript, or third-party embed container (Google Ads, Maps) |
| Menu Widget | Menu_Widget.php | Renders any custom navigation menu built in the Menu Builder |
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", "Footer Column 2").
- 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, menu selection)
- 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 widget zone columns across all frontend pages.
Custom themes can register additional Widget Areas. See Building a Custom Theme for implementation details.
Built-in Shortcodes
Shortcodes provide an easy way to embed dynamic post grids and content blocks directly inside post or page content using bracket syntax.
Available Shortcodes (3 Core Handlers)
| Shortcode | Parameters | Description |
|---|---|---|
[polycms_post] | id, slug, layout (card, list, compact), show_thumbnail, show_excerpt | Embed single or multiple posts into pages or articles |
[polycms_category] | slug, count, columns (2, 3, 4), order (DESC, ASC), orderby (date, views) | Renders a responsive post grid filtered by category |
[polycms_tag] | slug, count, columns | Renders a post grid matching specific tags |
Using Shortcodes
Insert shortcode syntax anywhere in the TinyMCE editor content area. PolyCMS parses and renders shortcodes dynamically 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.
Launch Your CMS for Perfex CRM — Lifetime Access for Just $19
Create blogs, pages, themes, plugins, and manage everything from one powerful unified admin panel.
Early Adopter Advantage
Current pricing reflects the module’s present feature set. As additional plugins, themes, multilingual capabilities, builders (MTBuilder), and ecosystem integrations are released, pricing may be adjusted. Early customers secure today’s price while benefiting from future updates.