
前言介紹
- 這款 WordPress 外掛「AM Events」是 2013-05-04 上架。
- 目前有 100 個安裝啟用數。
- 上一次更新是 2017-11-14,距離現在已有 3026 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 3.3.1 以上版本才可以安裝。
- 有 7 人給過評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
moisture |
外掛標籤
dates | Event | venue | events | calendar |
內容簡介
此外掛的目的是新增一種與正常文章類型類似的事件類型。設計上,此外掛不提供任何現成的佈局,並允許完全集成和自訂到您選擇的主題中。
目前功能
管理頁面以查看/創建/修改事件。
可用的事件數據字段:開始日期、結束日期、場地、類別
創建每週或每兩週循環的事件
可完全自訂的小工具,用於顯示即將發生的事件。
此外掛創建的自定文章類型為“am_event”,並有兩個分類: “am_event_categories” 和 “am_venues”。日期存儲為文章元數據。顯示事件是通過使用 WP_Query 和該外掛所提供的模板標籤在主題文件中完成的。這允許完全控制佈局和顯示哪些元素。
用於顯示即將發生活動的小工具使用簡單的模板系統進行佈局完全控制。
如果您認為有關鍵性缺失,請隨時發送請求給我。
此外掛可用以下語言(pot 文件包括其他翻譯):
英語
法語
挪威語
芬蘭語
教程
要將 AM Events 集成到現有主題中,建議使用自定頁面模板創建子主題。您可以從https://github.com/attemoi/am-events-child-theme中找到可以使用的 Twenty Twelve 子主題,其中包含三個不同的事件頁面頁面模板的示例。
小工具
以下是即將發生的活動小工具模板中可用的簡碼。
[event-title]
[start-date]
[end-date]
[event-venue]
[event-category]
[content]
[thumbnail]
[excerpt]
[permalink]
[meta]
條件簡碼:
[if cond="startdate-is-enddate"]
[if cond="startdate-not-enddate"]
[if cond="startday-is-endday"]
[if cond="startday-not-endday"]
[if cond="has-venue"]
[if cond="has-category"]
標題可以使用“link”屬性鏈接到事件文章,例如 [event-title link=true]
類別和場地也可以使用“link”屬性鏈接到它們各自的檔案庫頁面,例如 [event-category link=true]。
標題、內容或摘要中顯示的單詞數可以通過“limit”屬性進行限制,例如 [content limit=25] 或 [event-title limit=10]。
日期可以使用“format”屬性進行格式化,例如 [start-date format='d.m.Y H:i'](請參閱PHP date有關格式選項的說明)。如果未提供格式,則使用默認的 WordPress 日期格式。
您可以在單個模板中多次使用任何簡碼。例如,要分開開始日期和時間,可以寫成:
[start-date format='d.m.Y']
<span>divider</span>
[start-date format='H:i']
條件簡碼的使用示例:
[start-date format='D d.m.Y H:s']
[if cond='startdate-not-enddate']
- [end-date format='D d.m.Y H:s']
[/if]
標記模板
原文外掛簡介
The purpose of this plugin is to add an event type similar to the normal post type. By design this plugin doesn’t provide any ready-made layouts, and allows the events to be fully integrated and customized to the theme of your choosing.
Current Features
Admin pages to view/create/modify events.
Available data fields for events: start date, end date, venue, category
Create weekly or biweekly recurring events
Fully customizable widget for displaying upcoming events.
The custom post type created by the plugin is named ‘am_event’ and has two taxonomies: ‘am_event_categories’ and ‘am_venues’. Dates are stored as post metadata. Displaying the events is done in the theme files using WP_Query and the template tags provided by the plugin. This allows full control over the layout and what elements to show.
The widget for displaying upcoming events uses a simple template system for full control of the layout.
If you think something critical is missing, feel free to send me a request.
The plugin is available in the following languages (pot-file included for additional translations):
English
French
Norwegian
Finnish
TUTORIAL
For integrating AM Events to an existing theme, I suggest creating a child theme with custom page templates. You can find an example of a working Twenty Twelve child theme from https://github.com/attemoi/am-events-child-theme containing three different page templates for event pages.
Widget
Here are the shortcodes available in the upcoming events widget template.
[event-title]
[start-date]
[end-date]
[event-venue]
[event-category]
[content]
[thumbnail]
[excerpt]
[permalink]
[meta]
Conditional shortcodes:
[if cond=”startdate-is-enddate”]
[if cond=”startdate-not-enddate”]
[if cond=”startday-is-endday”]
[if cond=”startday-not-endday”]
[if cond=”has-venue”]
[if cond=”has-category”]
The title can be linked to the event post with the ‘link’ attribute, e.g. [event-title link=true]
The category and venue can also be linked similarly to their respective archive pages using the ‘link’ attribute, e.g. [event-category link=true]
The number of words displayed in the title, content or excerpt can be limited by the ‘limit’ attribute, e.g. [content limit=25] or [event-title limit=10].
The dates can be formatted using the ‘format’ attribute, e.g. [start-date format=’d.m.Y H:i’] (see PHP date for formatting options). If no format is given, the default WordPress date format is used.
You can use any shortcode as many times as needed in a single template. To separate date and time of start date for example you could write:
[start-date format='d.m.Y']
divider
[start-date format='H:i']
Example usage of conditional shortcode:
[start-date format='D d.m.Y H:s']
[if cond='startdate-not-enddate']
- [end-date format='D d.m.Y H:s']
[/if]
Template tags
Template tags were introduced in version 1.3.0 and are listed below. More documentation can be found in the source files.
// Template tags for getting and displaying event dates
am_the_startdate($format = 'Y-m-d H:i:s', $before = '', $after = '', $echo = true)
am_get_the_startdate( $format = 'Y-m-d H:i:s', $post = 0 )
am_the_enddate($format = 'Y-m-d H:i:s', $before = '', $after = '', $echo = true)
am_get_the_enddate( $format = 'Y-m-d H:i:s', $post = 0 )
// Template tags for getting and displaying event venues
am_get_the_venue( $id = false )
am_in_venue( $venue, $post = null )
am_get_the_venue_list( $separator = '', $parents='', $post_id = false )
am_the_venue( $separator = '', $parents='', $post_id = false )
// Template tags for getting and displaying event categories
am_get_the_event_category( $id = false )
am_get_the_event_category_list( $separator = '', $parents='', $post_id = false )
am_in_event_category( $eventCategory, $post = null )
am_the_event_category( $separator = '', $parents='', $post_id = false )
Example of displaying the first category of the current event post:
$categoryArray = am_get_the_event_category();
echo $categoryArray[0]->name;
Creating a WP_Query
The custom post type is named ‘am_event’
The taxonomies are named ‘am_venues’ and ‘am_event_categories’.
The event post has metadata named ‘am_startdate’ and ‘am_enddate’ that are formatted like ‘yyyy-mm-dd hh:mm’
So suppose I wanted to display all events with a category of ‘other’ and venue ‘mcdonalds’. I would then make a WP_Query like this:
$args = array(
'post_type' => 'am_event',
'post_status' => 'publish',
'tax_query' => array(
'relation' => 'AND',
array(
'taxonomy' => 'am_venues',
'field' => 'name',
'terms' => 'mcdonalds',
),
array(
'taxonomy' => 'am_event_categories',
'field' => 'name',
'terms' => 'other'
),
),
);
$the_query = new WP_Query($args);
if ($the_query->have_posts()) {
while ($the_query->have_posts()) {
$the_query->the_post();
$postId = $post->ID;
// Use template tags to get start and end date
$startDate = am_get_the_startdate('Y-m-d H:i:s');
$endDate = am_get_the_enddate('Y-m-d H:i:s');
// Use template tags to get venues and categories in an array
$venues = am_get_the_venue( $postId );
$eventCategories = am_get_the_category( $postId );
// All the other functions used for posts like
// the_title() and the_content() work just like with normal posts.
// ... DISPLAY POST CONTENT HERE ... //
}
}
If you want the events ordered by start date, add the following to $args:
'orderby' => 'meta_value',
'meta_key' => 'am_startdate',
'order' => 'ASC',
If you need to display only upcoming events, add the following meta_query argument to $args:
'meta_query' => array(
array(
'key' => 'am_enddate',
'value' => date('Y-m-d H:i:s', time()),
'compare' => ">",
),
),
The plugin folder also contains a file “examples.php”, which contains an example function for displaying upcoming events in a table.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「AM Events」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
1.0.0 | 1.0.1 | 1.1.0 | 1.2.0 | 1.2.1 | 1.3.0 | 1.3.1 | 1.4.0 | 1.5.0 | 1.5.1 | 1.6.0 | 1.7.0 | 1.7.1 | 1.8.0 | 1.9.0 | 1.9.1 | 1.9.2 | 1.9.3 | 1.9.4 | 1.9.5 | 1.9.6 | 1.9.7 | 1.9.8 | trunk | 1.10.0 | 1.11.0 | 1.12.0 | 1.13.0 | 1.13.1 |
延伸相關外掛(你可能也想知道)
The Events Calendar 》使用 The Events Calendar 免費外掛程式,在您的 WordPress 網站上輕鬆創建和管理事件日曆。不論您的事件是實體活動還是虛擬事件,這款 WordPress 日曆插件都...。LatePoint – Calendar Booking Plugin for Appointments and Events 》總結:LatePoint 是一個功能強大且用戶友好的 WordPress 預約管理外掛,簡化了任何規模企業的預訂管理。它提供多種功能,包括直觀的管理面板、適應移動裝置的...。
Events Manager – Calendar, Bookings, Tickets, and more! 》Events Manager 是一個全功能的 WordPress 活動註冊外掛程式,擁有靈活、可靠和強大的功能原則!, 版本 6 是到目前為止最大的更新,完全重構了我們的日曆、列...。
Timetable and Event Schedule by MotoPress 》le and Event Schedule 的繁體中文描述:, MotoPress Timetable and Event Schedule 是一個全方位的組織者外掛程式,旨在協助您建立和管理單個或多個事件的線...。
SimplyBook.me – Booking and reservations calendar 》**總結:**, 這個外掛將解決您網站上的線上預約問題。如果您需要客戶在線預訂,SimplyBook.me 將為您提供一個完美的解決方案,以實現預訂的高效管理。SimplyB...。
WP Simple Booking Calendar 》您需要一個預訂行事曆來展示您度假屋的可用性嗎?如果您將您的度假屋租給來自世界各地的遊客,您應該在您的網站上使用這個免費的外掛程式!這個預訂行事曆非...。
WP Event Manager – Events Calendar, Registrations, Sell Tickets with WooCommerce 》插件,非常容易使用且不會讓你感到事件管理插件過於複雜和功能繁多。你想要一種直觀、快速的方式來快速創建活動,而且需要快速設置活動,無論是實體活動、虛...。
Store Vacation for WooCommerce 》商店老闆可能很難找到時間去度假,但當他們這樣做時,他們需要為自己的網店做好規劃。, Store Vacation 外掛提供了 WooCommerce 核心中缺少的強大功能,使站...。
The Events Calendar Shortcode & Block 》標籤內容:, , 使用 The Events Calendar Shortcode 和 Block,在需要顯示活動的地方顯示可自定義的活動列表!此外掛程式完全整合了現代部落客 (Modern Tribe...。
XO Event Calendar 》XO Event Calendar 是一款簡單易用的活動行事曆外掛。, 其他活動可以設定為節日。, 功能特色, , 增加活動自訂文章類型及分類。, 支援自訂文章類型範本。, 在...。
Events Shortcodes For The Events Calendar 》翻譯:, , The Events Calendar Shortcodes, 我們為 The Events Calendar 外掛提供的活動簡碼解決了缺失簡碼的問題,並提供簡碼產生器和自定義的 Gutenberg ...。
Easy Appointments 》在你的WordPress網站中添加預約系統,輕鬆管理預約。時間管理十分靈活,並且可以多地點、多服務和多工作人員。能用於:律師、美容院、修車、清潔服務、醫生、...。Biz Calendar 》Biz Calendar 是一款 WordPress 外掛,可以在小工具中顯示營業日和活動日曆。, 您可以輕鬆地在側邊欄位上建立顯示休業日和活動開催日的日曆。, 特色, , 可以...。
Appointment Hour Booking – Booking Calendar 》Appointment Hour Booking 是一個 WordPress 外掛程式,可建立預約表單,用於具有開始時間和預定時間表的預約。使用者可以從一組根據「營業時間」和服務時間...。
WP-Persian 》WP-Persian 是一款快速強大的 WordPress 插件,可提供 Jalali 月曆和波斯語言支援,並支援標準插件。, , 如果您喜歡這款插件,請隨時在這個頁面的右側評分!,...。
