What are WordPress Shortcodes?
Shortcodes are simple text tags that you can place inside a WordPress page or post to display dynamic content generated by a plugin or theme.
They make it easy to insert complex features without writing any code.
A shortcode looks like this:
[ShortcodeName option1=value1 option2=value2]
When the page is viewed, WordPress replaces the shortcode with the output defined by the plugin – for example, a list of contacts, a map, or a login menu.
How to Use Shortcodes
- Edit the page or post where you want the content to appear.
- Click the + icon to add a new block.
- Search for “Shortcode” and select the Shortcode block.
- Type or paste the shortcode inside the block.
- When using the classic editor, just type or paste the shortcode in the content area.
- Add parameters (if needed) to customize the output.
- Update or publish the page
- –> the shortcode will be replaced by the plugin’s content.
✅ You can place multiple shortcodes on the same page.
Shortcodes from the MMS Plugin
[BranchContacts]
Displays branch contact details.
Options:
b – Branch ID (optional)
bank=1 – Show branch bank details
map=1 – Show a map to the branch
Examples:
[BranchContacts b=15]
[BranchContacts b=11 bank=1 map=1 ]
Get Branch ID’s from /branch-list/
[OfficeBearer]
Shows contact details of an office bearer for a specific duty.
Options:
D – Duty ID (required)
B – Branch ID (optional)
Examples:
[OfficeBearer D=3]
[OfficeBearer D=3B=7]
Get Duty ID’s from /duties/
Get Branch ID’s from /branch-list/
[duty d=DutyID] Shows name & description of a Duty
[branch_list] Shows a list of branches
[member_list] Shows a list of members
[membertypes] Shows a list of membertypes
[member_record] Displays details of a specific member
[mms_branches_grid num=3 class="branch-sec"] Shows a grid of branches
[mms_events_grid num=5 class="event-sec"] Shows a grid of events