Reading Guide Latest Updates
A WordPress plugin to add a simple latest news/updates to a page or post.
by Neil Thompson · github.com/williamsdb/reading-guide-latest-updates
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/williamsdb/reading-guide-latest-updates/archive/refs/heads/main.zipReading Guide Latest Updates WordPress Plugin
Description
A WordPress plugin that allows you to manage and display latest updates with navigation functionality. The plugin creates a custom database table to store updates and provides an admin interface for managing them, plus a shortcode for displaying them on the frontend.
Features
- Custom admin menu entry "Reading Guide Updates"
- Custom database table for storing updates (id, date, text)
- Admin interface with text/HTML input form
- DataTable display of all updates in admin
- Shortcode
[rglu]for frontend display - Navigation arrows to browse through updates
- Responsive design
- Text overflow handling to prevent line wrapping
Installation
- Upload the
reading-guide-latest-updatesfolder to your WordPress/wp-content/plugins/directory - Activate the plugin through the 'Plugins' menu in WordPress
- The database table will be created automatically upon activation
Usage
Admin Interface
- Go to Reading Guide Updates in your WordPress admin menu
- Enter text or HTML in the "Update Text/HTML" field
- Click "Save Update" to add it to the database
- View all updates in the DataTable below the form
- Delete updates using the "Delete" button in the Actions column
Frontend Display
Use the shortcode [rglu] in any post, page, or widget to display the updates bar.
The shortcode displays:
- A light grey bar containing the latest update
- Date in dd/mm/yyyy format
- The update text (truncated to prevent overflow)
- Navigation arrows (< >) to browse through updates
- Disabled state for arrows when at first/last items
Database Table
The plugin creates a table wp_rglu_updates (prefixed with your WordPress table prefix) with:
id: Auto-increment primary keydate: Timestamp (automatically set to current time)text: The update content (text/HTML)
File Structure
reading-guide-latest-updates/
├── reading-guide-latest-updates.php # Main plugin file
└── assets/
├── admin.css # Admin interface styles
├── admin.js # Admin interface JavaScript
├── frontend.css # Frontend shortcode styles
└── frontend.js # Frontend navigation JavaScript
Requirements
- WordPress 5.0+
- PHP 7.4+
- jQuery (included with WordPress)
Browser Compatibility
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
Changelog
Version 1.0
- Initial release
- Admin interface with DataTable
- Shortcode display with navigation
- Database table creation
- Responsive design
- Text overflow prevention