
內容簡介
總結:Mobilize America 活動縮碼/小工具將顯示 Mobilize America 的活動清單,可選擇 Card 和 Default (List) 兩種版面。Elementor 小工具可自定義預設樣式。此外,這個外掛連接到 MobilizeAmerica 的 API,以拉取特定組織的活動。
問題與答案:
1. 這個外掛可用來做什麼?
- 可以在 WordPress 網站上顯示 Mobilize America 的活動清單。
2. 這個外掛提供了哪兩種版面?
- Card (卡片) 和 Default (列表)。
3. 這個外掛連接到哪個服務的 API?
- MobilizeAmerica 的 API。
4. 若想顯示特定組織的活動,必須傳遞哪些參數?
- 組織 ID、開始日期,以及關於虛擬活動的變數。
5. 可以透過哪個指令來顯示 Mobilize America 的活動?
- [mobilize_america_events] 指令。
6. 如何調整活動顯示的樣式?
- 透過參數中的 template 選項,可選擇 default 或 card,分別為列表和卡片格式。
7. 如何指定只顯示虛擬或實體活動?
- 使用 is_virtual 參數,可選擇 “” (所有活動)、 “true” (僅虛擬活動)、或 “false” (僅實體活動)。
8. 有哪些計畫中的功能?
- 調整預設樣式、修復時區偏移、卡片模板的描述截斷、修復 Elementor 小工具的樣式設定、單一活動顯示、輸出縮碼內容的區塊。
外掛標籤
開發者團隊
② 後台搜尋「Shortcode for MobilizeAmerica API」→ 直接安裝(推薦)
原文外掛簡介
The Mobilize America Events shortcode / widget will display a list of events from Mobilize America.
There are 2 layouts – Card & Default (List).
The elementor widget allows you to override the default styles.
External Services
This plugin connects to MobilizeAmerica’s API to pull in events for a specific organization.
The shortcode / elementor widget passes a specificed organization id, a start date and a variable about virtual events.
This service is provided by MobilizeAmerica – https://api.mobilize.us
* API Documentation
* Mobilize Terms of Use
* MobilizePrivacy Policy
Instructions for Shortcode for MobilizeAmerica API
This shortcode allows you to display events from Mobilize America on your WordPress site.
The Element widget outputs the code for the shortcode so you do not have to build it manually
Shortcode: [mobilize_america_events]
Attributes
The shortcode accepts the following attributes:
* organization_id (required): The ID of the organization whose events you want to display. You can find this ID on Mobilize America. https://www.mobilize.us/dashboard/YOUR-ORGANIZATION/settings/
* organization_only: (optional): yes/no – if set to yes then only the organzation events will be shown without promoted events
* timeslot_start: (optional): Suggested: gte_now which is greater than now – Unix timestamp to filter events. Only shows events withtimeslots starting after this date.
* timeslot_end: (optional): Unix timestamp to filter events. Only shows events with timeslots starting before this date.
Note: For timeslot please use comparison text – The comparison operators are ≥ gte, > gt, ≤ lte, < lt
* event_types: (optional): Filters events by event type.
* zipcode: (optional): Filters events by zipcode.
* radius: (optional): Filters events by a radius around the zipcode.
* limit: (optional): The maximum number of events to display. Default is 10.
* template: (optional): The template to use for displaying events. Available options are:
* default: Displays events in a list format.
* card: Displays events in a card format.
* show_description: (optional): Show or hide the event description. Default is true. Options are:
* true: Show the description.
* false: Hide the description.
* is_virtual: (optional): Filters events by their virtual status. Options are:
* “”: Show all events (default).
* “true”: Show only virtual events.
* “false”: Show only in-person events.
* columns: (optional, only applies to the card template): The number of columns to use for the card layout. Options are 1, 2, 3, or 4. Default is 3.
* tag_id: (optional): comma separated list of tag ids to filter by
Planed Features
Truncate Description
Fix Elementor Widget Style settings
Map Link for Address
Remove Default & Card Layout for single layout – future feature of custom layout
Future Feature Ideas
Block to output shortcode content
Single Event Display
Custom Layout in uploads directory
UI for custom layout inside wordpress
Map Layout of events
Events stored locally in database to allow for better search / filtering
Examples
Display 10 events for organization ID 1234:
[mobilize_america_events organization_id="1234"]
Display 5 card formatted events for organization 1234, starting after 2024-01-01:
[mobilize_america_events organization_id="1234" template="card" timeslot_start="gte_1704137620" limit="5"]
Display virtual events in 2 columns:
[mobilize_america_events organization_id="1234" template="card" is_virtual="true" columns="2"]
