[WordPress] 外掛分享: Atomic Events Calendar

首頁外掛目錄 › Atomic Events Calendar
WordPress 外掛 Atomic Events Calendar 的封面圖片
全新外掛
安裝啟用
尚無評分
168 天前
最後更新
問題解決
WordPress 5.8+ PHP 7.4+ v1.0.3 上架:2025-09-30

內容簡介

總結:Atomic Events Calendar 是為開發者和代理機構而建,提供 WordPress 事件功能,無需完整事件管理外掛的繁重負擔。具有現成的事件文章型態、基本事件欄位、開發友善的短碼及主題結構,方便覆寫和自訂設計。

### 問題與答案:

1. 誰是 Atomic Events Calendar 的目標使用者?
- 開發者和代理機構。

2. Atomic Events Calendar 提供哪些功能?
- 提供現成的事件文章型態、基本事件欄位、開發友善的短碼、主題結構。
- 具備開發者友好的程式碼結構,使用 Tailwind CSS 進行響應式設計。
- 基於 JSON-LD 自動提供架構化數據以提升 SEO 及富片段。
- 提供自訂文章型態、模板覆寫系統、短碼支援等功能。

3. 如何使用 Atomic Events Calendar 基本功能?
- 透過短碼:`[atomic-events filter max='10' columns='3' featured='0' skip_first_x='0' skip_first_x_featured='1' order='ASC']`。

4. 如何自訂事件模板?
- 可透過以下方式:在子主題中複製至 `child-theme/atomic-events/single/single-atomic-event.php`,或在主題中複製。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.3) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Atomic Events Calendar」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Atomic Events Calendar is built for developers and agencies who need events in WordPress without the overhead of full event management plugins.
Instead of starting from scratch on every project, Atomic Events Calendar gives you:
– A ready-to-use Events post type
– Essential event fields (date, venue, type, etc.)
– Developer-friendly shortcodes to display and filter events
– A robust theming structure for easy overrides and custom designs
✨ Think of it as a lightweight framework disguised as a plugin: everything you need to set up events quickly, with the freedom to extend and customize as you like.
Perfect for agencies that want full control over their event implementations—without the bloat.
Features

Developer-Friendly – Clean code structure with services architecture
Responsive Design – Built with Tailwind CSS for modern, responsive layouts
Structured Data for Search Engines – Automatic JSON-LD schema markup for better SEO and rich snippets
Custom Post Type – Dedicated ‘atomic-event’ post type with all necessary fields
Template Override System – Easy theme integration with template hierarchy
Shortcode Support – Display events anywhere with [atomic-events] shortcode
Featured Events – Mark and display featured events prominently
Location Management – Complete address fields (street, city, state, country, postcode)
Date & Time Support – Start/end dates with time support
Image Support – Featured images with captions
Member-Only Events – Restrict events to members only
Performance Caching – Automatic shortcode caching with smart invalidation

Basic usage is through shortcode:
[atomic-events filter max='10' columns='3' featured='0'
skip_first_x='0' skip_first_x_featured='1' order='ASC']

How can I customize the event template?
The plugin provides a default template for single events, but you can override it in your theme:

Child Theme (recommended): Copy the template to child-theme/atomic-events/single/single-atomic-event.php
Parent Theme: Copy the template to parent-theme/atomic-events/single/single-atomic-event.php

The plugin will automatically use your theme’s version instead of the default.
See the example template in templates/theme-override-example.php for reference.
My event pages show 404 errors
If you experience 404 errors when viewing event pages:
1. Go to WordPress Admin → Events → Settings
2. Click “Flush Rewrite Rules”
3. If that doesn’t work, go to Settings → Permalinks and click “Save Changes”
Template Structure
The plugin provides a comprehensive template override system. You can override any template by creating files in your theme:

your-theme/
└── atomic-events/
│ ├── cards/
│ │ ├── card-item-default.php
│ │ ├── card-item-featured.php
│ │ ├── card-list-header-default.php
│ │ └── card-list-footer-default.php
│ ├── single/
│ │ └── single-atomic-event.php
│ ├── content/
│ │ └── single-event.php

Template Hierarchy
The plugin follows WordPress template hierarchy for single event pages. Templates are loaded in this order of priority:

Child Theme: child-theme/atomic-events/single/single-atomic-event.php
Parent Theme: parent-theme/atomic-events/single/single-atomic-event.php
Plugin Default: plugin/templates/single/single-atomic-event.php

Template Override System
The plugin uses a custom template loader that checks for theme templates first, then falls back to the plugin’s default template. This ensures:
– Theme compatibility: Works with any WordPress theme
– Customization flexibility: Easy to override in themes
– Update safety: Plugin updates won’t break custom templates
– Developer-friendly: Clear hierarchy and fallback system
Template Hierarchy Priority:

Child Theme: child-theme/atomic-events/[template-name].php
Parent Theme: parent-theme/atomic-events/[template-name].php
Plugin Default: plugin/templates/[template-name].php

Available Templates:
– Shortcode Templates: Override how events appear in lists and grids
– Single Event Templates: Customize individual event page layouts
– Content Templates: Modify event content display
The default template includes:
– WordPress header/footer integration
– Event model for accessing custom fields
– Template loader for modular content parts
– Proper WordPress loop structure
Custom Fields Available
When creating custom templates, you have access to these event fields:

$event_model = new AtomicEventModel(get_the_ID());

// Basic event data
$event_model->get_title();
$event_model->get_event_start_date();
$event_model->get_event_end_date();
$event_model->get_event_venue();
$event_model->get_event_location_city();
$event_model->get_event_country();
$event_model->get_event_location_state();
$event_model->get_event_location_region();

// Event settings
$event_model->is_featured();
$event_model->is_member_only();
$event_model->get_event_all_day();

// Additional data
$event_model->get_event_outbound_link();
$event_model->get_event_tag();
$event_model->get_event_image_id();
$event_model->get_permalink();

Creating Custom Templates

Copy the example template from templates/theme-override-example.php
Place it in your theme at the appropriate path
Customize the template as needed
Test thoroughly to ensure proper functionality

Hooks and Filters
The plugin provides several hooks for customization:

// Filter the template path
add_filter('atomic_events_template_path', 'my_custom_template_path', 10, 2);

// Filter event data before display
add_filter('atomic_events_event_data', 'my_custom_event_data', 10, 2);

// Filter whether to show event in lists
add_filter('atomic_events_should_show_in_list', 'my_custom_visibility_logic', 10, 2);

Shortcode Parameters
The [atomic-events] shortcode supports these parameters:
– filter: “future” or “past” (default: “future”)
– max: Maximum number of events (default: 20)
– columns: Number of columns (default: 3)
– featured: Show only featured events (true/false)
– skip_first_x: Skip first X events
– skip_first_x_featured: Skip first X featured events
– order: “ASC” or “DESC” (default: “ASC”)
Best Practices

Always use child themes for customizations
Test with different themes to ensure compatibility
Use the event model for accessing custom fields
Follow WordPress coding standards
Document custom modifications
Test thoroughly before deployment

延伸相關外掛

文章
Filter
Apply Filters
Mastodon