Project Type: WordPress Plugin
Description: Enter project notes here
- Overview
- Features
- Installation
- Configuration
- Usage
- Components
- Dependencies
- Development
- Uninstall
- License
Blog List is a modular WordPress plugin that provides a customizable way to display lists of blog posts on the frontend via:
- Shortcode (
[blog_list]
) - Widget (drag-and-drop sidebar placement)
- Gutenberg block (with sidebar controls)
It includes an admin settings page for configuration, supports pagination, category/tag filtering, caching via the Transient API, template overrides for styling, and internationalization support.
- Shortcode
[blog_list]
with attributes:number
,category
,order
- Widget for sidebar placement
- Gutenberg block with sidebar controls
- Admin settings page for defaults and styling
- Pagination support
- Category and tag filtering
- Template override capability
- Caching via Transient API
- Enqueued CSS/JS assets
- Internationalization (i18n) support
- Download or clone the repository into your WordPress plugins directory:
wp-content/plugins/vibesheet-20250629_233757
- Log in to your WordPress admin dashboard.
- Go to Plugins ? Installed Plugins.
- Locate vibesheet-20250629_233757 and click Activate.
- In the admin sidebar, go to Settings ? Blog List Settings.
- Configure your default post count, order, styling options, cache expiration, etc.
- Save changes.
Insert the shortcode in any post or page:
[blog_list number="5" category="news" order="DESC"]
number
(int): Number of posts to display (default from settings).category
(slug or ID): Filter by category.order
(ASC|DESC): Sort order.
- Go to Appearance ? Widgets.
- Add Blog List widget to your desired sidebar.
- Configure title, number of posts, filters, etc.
- In the block editor, click + and search for Blog List.
- Insert the block and configure in the sidebar controls (number, category, order).
Below is a breakdown of key files and classes:
- pluginmain.php
Main plugin bootstrap with header, hook registrations, textdomain loading. - mainpluginfile.php
Initializes plugin, activation/deactivation hooks, loads all components. - classbloglistplugin.php
Core class:__construct()
,activate()
,deactivate()
,init()
,loadTextdomain()
,registerComponents()
. - adminsettingspage.php / classbloglistadmin.php
Admin settings page: register settings, sections, fields, render the settings UI. - shortcodehandler.php / classbloglistshortcode.php
Registers[blog_list]
shortcode, fetches posts, renders output. - widgethandler.php / classbloglistwidget.php
Defines a widget class for sidebar placement (form, update, widget output). - blockregistration.js / classbloglistblock.php
Registers Gutenberg block, enqueues editor & frontend assets, render callback. - assetsstyles.css
Default CSS for blog list output. - bloglist.php
Template loader: fetches data and includes template files for rendering. - uninstall.php
Cleans up options and transients on uninstall.
- WordPress 5.0+
- PHP 7.0+
- Gutenberg (for block support)
- No external libraries
- Clone the repo and run a local WordPress environment (e.g., LocalWP, Docker).
- Enable debug mode in
wp-config.php
:define( 'WP_DEBUG', true ); define( 'WP_DEBUG_LOG', true ); define( 'WP_DEBUG_DISPLAY', false );
- Write code in the
src/
folder (if splitting source) or directly in plugin files. - Use WordPress Coding Standards and PHPCS for linting.
- Translate strings:
xgettext --language=PHP --keyword=__ --keyword=_e --output=languages/vibesheet.pot path/to/files/*.php
Upon plugin uninstall (via Plugins ? Delete), the uninstall.php
script will:
- Remove all plugin options (settings).
- Delete any transients created for caching.
This project is licensed under the MIT License. See the LICENSE file for details.