Skip to content

This plugin adds RSS feeds to the website, using the configured OpenPUB source.

Notifications You must be signed in to change notification settings

OpenWebconcept/plugin-openpub-rss

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

OpenPub RSS

RSS feed functionality for OpenPub

Description

This plugin provides RSS 2.0 and Atom 1.0 feed functionality for OpenPub portal sites. It fetches items from a configured OpenPub API source and generates standards-compliant feeds with images, categories, and caching.

Features

  • Dual feed formats: RSS 2.0 at /rss.xml and Atom 1.0 at /atom.xml
  • Rich metadata: Full HTML content, categories, images as enclosures
  • Smart caching: Server-side transient caching + HTTP cache headers (configurable TTL)
  • Portal detection: Only serves feeds when "openpub api url" is configured (options_openpub_api_url has a value)
  • Native WordPress: Uses Settings API, no external dependencies
  • Network-safe: Can be activated network-wide, gracefully does nothing without configuration

Requirements

  • PHP 7.4 or higher
  • WordPress 5.0 or higher
  • OpenPub API URL configured in options_openpub_api_url

Installation

  1. Clone or download this repository to your WordPress plugins directory
  2. Run composer install to install dependencies, only needed for development, for WP Coding Standards
  3. Activate the plugin through the WordPress admin interface, or with WP-CLI: wp plugin activate openpub-rss --network
  4. Configure settings at Settings → OpenPub RSS

Configuration

Navigate to Settings → OpenPub RSS to configure:

  • Feed Title: Title of your RSS feed (default: site name)
  • Feed Description: Brief description of your feed (default: site tagline)
  • Items Per Feed: Maximum items to include (1-100, default: 20)
  • Include Images: Include images as enclosures (default: enabled)
  • Cache Duration: Transient and HTTP cache TTL in minutes (1-1440, default: 15)

Feed URLs

Once configured, your feeds will be available at:

  • RSS 2.0: https://yoursite.com/rss.xml
  • Atom 1.0: https://yoursite.com/atom.xml

Caching

The plugin uses a two-tier caching strategy:

  1. Server-side: WordPress transients cache API responses (configurable TTL)
  2. Client-side: HTTP headers (Cache-Control, Expires) match the transient TTL

This reduces server load and API calls while ensuring feeds stay fresh.

Troubleshooting

Feeds return 404 error

The plugin uses WordPress rewrite rules to handle /rss.xml and /atom.xml URLs. If you're getting a 404 error:

  1. Deactivate and reactivate the plugin - This automatically flushes rewrite rules
  2. Or manually flush: Go to Settings → Permalinks and click "Save Changes" (you don't need to change anything)
  3. Or use WP-CLI: wp rewrite flush

The plugin automatically flushes rewrite rules on activation and deactivation, but if you're still having issues, one of these methods should resolve it.

Coding Standards

Run PHP CodeSniffer to check code quality:

composer install
./vendor/bin/phpcs

License

GPL-3.0-or-later

Credits

Developed by Acato for the OpenWebconcept community.

About

This plugin adds RSS feeds to the website, using the configured OpenPUB source.

Resources

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages