Wordpress Plugin for FOSSASIA events website
The FOSSASIA Event Plugin provides WordPress integrations for Eventyay-based events. It lets you display event landing pages, speakers, events, past events, schedules, and code of conduct content using classic page templates, Gutenberg blocks, or shortcodes. Shortcodes and blocks use embedded template rendering so WPFA content can live inside existing theme pages without the standalone template header/footer.
This plugin is maintained by FOSSASIA and is compatible with the eventyay platform.
wp_remote_get() must be availableFor contributors only: Node.js >= 24 is required for the npm-based lint/format toolchain (
npm install,npm run lint, etc.). It is not needed to install or use the plugin.
Clone the repository into your WordPress wp-content/plugins/ directory:
git clone https://github.com/fossasia/WPFAevent.git event-pluginInstall JavaScript dev tooling (contributors only — not required to use the plugin):
# If you use nvm:
nvm install 24 && nvm use 24
npm installActivate Event Plugin in the WordPress Admin under Plugins → Installed Plugins → Event Plugin → Activate.
Configure your API endpoints:
Add WPFA template shortcodes to your pages or posts, for example:
[wpfaevent_landing]
[wpfaevent_speakers]
[wpfaevent_events]
[wpfaevent_past_events]
[wpfaevent_schedule]
[wpfaevent_code_of_conduct]You can also add the matching WPFA blocks in the block editor.
| Script | Command | Description |
|---|---|---|
npm run lint |
eslint . |
Lint all JavaScript files using the WordPress ESLint config |
npm run lint:fix |
eslint . --fix |
Auto‑fix lint errors |
npm run format |
prettier --write "**/*.{js,json}" |
Apply Prettier formatting |
npm run phpcs |
composer phpcs |
Run PHP_CodeSniffer on PHP files |
npm run phpcbf |
composer phpcbf |
Auto‑fix PHP coding‑standard violations |
npm run phpstan |
composer phpstan |
Run PHPStan static analysis |
npm run check |
npm run lint && npm run phpcs && npm run phpstan |
One‑command quality check (JS + PHP) |
Tip: Before opening a Pull Request, run
npm run checklocally to ensure both JavaScript and PHP code meet the project’s standards.
…| Shortcode | Description | Output Source |
|---|---|---|
[wpfaevent_landing] |
Displays the WPFA event landing page. | WPFA template |
[wpfaevent_speakers] |
Displays the speaker directory. | WPFA template |
[wpfaevent_events] |
Displays the upcoming events hub. | WPFA template |
[wpfaevent_past_events] |
Displays the past events archive. | WPFA template |
[wpfaevent_schedule] |
Displays the event schedule. | WPFA template |
[wpfaevent_code_of_conduct] |
Displays the code of conduct content. | WPFA template |
[wpfaevent_template template="events"] |
Embeds a selected WPFA template by template key. | WPFA template |
Note: All shortcodes now accept an optional align attribute (align="wide" or align="full"). When provided, the shortcode output will be wrapped in a corresponding alignment container, e.g., [wpfaevent_events align="full"]. If omitted, the shortcode renders the raw embed without altering the surrounding layout.
The generic wpfaevent_template shortcode accepts a template attribute. Supported values include landing, speakers, events, past_events, schedule, and code_of_conduct.
| Block Title | Block Name |
|---|---|
| WPFA Landing | wpfaevent/landing |
| WPFA Speakers | wpfaevent/speakers |
| WPFA Events | wpfaevent/events |
| WPFA Past Events | wpfaevent/past-events |
| WPFA Schedule | wpfaevent/schedule |
| WPFA Code of Conduct | wpfaevent/code-of-conduct |
WPFA blocks render dynamically and share the same embedded template mode as the shortcodes.
Each generic template shortcode can accept optional attributes, for example:
[wpfaevent_template template="speakers"]Speaker profiles use the wpfa_speaker custom post type, registered speaker metadata, and the event-speaker relationship fields wpfa_event_speakers and wpfa_speaker_events.
See docs/speaker-data-model.md for the speaker fields, REST-exposed metadata, relationship sync behavior, and the interim session metadata approach.
Navigate to Settings → Event Plugin to configure:
https://example.org/api/v1/events/{id}/speakershttps://example.org/api/v1/events/{id}/sessionshttps://example.org/api/v1/events/{id}/scheduleIf the fields are left empty, the plugin falls back to placeholder content for development.
The schedule page exposes an Add to calendar link when an event has a valid start date. The link opens a Google Calendar event template. Individual events can also be downloaded as .ics files from /wp-json/wpfaevent/v1/events/{event_id}/ics.
Event timezone behavior is deterministic:
DTSTART and exclusive date-only DTEND values.DTSTART/DTEND values.Core logic resides in includes/, presentation templates in public/partials/.
All user-facing text should use translation functions __() or _e().
Load assets using wp_enqueue_script() and wp_enqueue_style().
Use the built-in caching layer via transients in class-event-api.php.
Do not commit large demo data or real images — use placeholders only.
To modify the layout, you can override templates in your theme directory:
your-theme/event-plugin/partials/event-speakers.phpWordPress will automatically use the theme’s version if it exists.
wp-content/plugins/.wp wpfa import again whenever you need to refresh imported events and speakers from the configured Eventyay source.To debug API calls, enable WordPress debug logging in wp-config.php:
define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );Logs can be found in /wp-content/debug.log.
Text Domain: event-plugin).languages/ directory..mo and .po files using tools such as Poedit or Loco Translate.Contributions are welcome!
Fork the repository on GitHub
Create a feature branch:
git checkout -b feature/my-featureCommit and push your changes, then submit a Pull Request
Follow WordPress PHP coding standards
# Install dev dependencies
composer install
# Run code style checks
composer phpcs
# Auto-fix code style violations
composer phpcbf
# Run static analysis
composer phpstan
# Bootstrap the WordPress test environment
# Requires WP_DB_USER and WP_DB_PASS env vars (defaults: wp_test / test_password)
composer setup-tests
# Run the test suite
composer test
# Run a specific test suite
composer test -- --testsuite Unit
composer test -- --testsuite IntegrationBefore submitting:
npm run check to ensure both JS and PHP quality checks pass.composer test to ensure the full PHP test suite passes.__() or _e()Licensed under the Apache License, Version 2.0 Copyright © 2025 FOSSASIA
No open issues yet, or sync has not completed.