WordPress Shortcodes

WordPress Shortcodes

Shortcode Blocks

shortcode is a WordPress-specific code that can create objects in your website that would normally require lots of complicated code.  The CouncilWare WordPress plugin provides a number of shortcode blocks that bring information over from the MyCouncil Service App and display them in your website.  Once you have the block inserted in your website, the block will retrieve information in real-time and display it. They are basically "set it and forget it" tools. Your website will then always show the latest information in the block.

Add a Shortcode Block

To add a shortcode block, click on the + Block Inserter icon and search for “shortcode”. Click to add the block to a page, post, or template. Or you can simply type /shortcode and press enter: 

Available Shortcode Blocks

The following shortcodes are provided in the CouncilWare WordPress plugin. Use the table of contents or read below for full instructions on how to use each shortcode.
  1. [cw_calendar] embeds a full calendar as defined in the SvcApp
  2. [cw_event_list] embeds a list of published events based on a tags
  3. [cw_event_grid] embeds a grid of published event based on a calendar or tag
  4. [cw_event_button] embeds a button that will point to an event's Landing Page
  5. [cw_event_registration_button] embeds a button that will point to the registration dialog for an event
  1. [cw_unit_search] - embeds a set of tools that allows users to search for units in your council

Shortcode Block Reference

Calendar

The Calendar shortcode renders a full calendar at the point where it is inserted on your page. On a desktop screen, the calendar will show as a typical grid showing a full month. On a mobile screen, the calendar will only show a formatted list of events for a single month. The calendar also has buttons to move from one month to the next and also a tool to go directly to any individual month.



Full syntax
  1. [cw_calendar id="n" switcher="true|false"]
Parameters
  1. id="n" (required) specifies the Calendar ID as defined in the MyCouncil Service App. The Calendar ID can be found in the Calendar Grid under Manage Calendars.
  2. switcher="true|false" (optional) If "true" a dropdown control will appear above the calendar that will allow users to switch between other calendars you have defined. The calendars shown in the switcher are configured in the "Configure Calendar Switcher" tool in the MyCouncil Service App. If not specified, the default is "false".

Event List

The Event List shortcode renders a basic list of events on your website page. You specify a Tag (defined in the MyCouncil Service App) and the list shows all upcoming events that are hooked to that tag. Each list item shows the date and name of the event. The name of the event is a link that points to the event's Landing Page. After an event has concluded, it's item drops off the list.



Syntax
  1. [cw_event_list tag="tag" number="n"]
Parameters
  1. tag="tag" (required) specifies the Handle of a tag who's events are to be rendered in the list.
  2. number="n" (optional) indicates the maximum number of list items to show. If not specified, all upcoming events, hooked to that tag, are shown.

Event Grid

The Event Grid shortcode renders a grid of event blocks on your website page. You specify a CalendarID or a Tag (defined in the MyCouncil Service App) and the grid shows all upcoming events that are hooked to that calendar or tag. Each event block shows the date, location and name of the event. The name of the event is a link that points to the event's Landing Page. After an event has concluded, it's item drops off the grid.



Syntax
  1. [cw_event_grid calendar="id" | tag="tag" number="n"]
Parameters
  1. calendar="id" (calendar or tag are required) specifies the Calendar ID as defined in the MyCouncil Service App. The Calendar ID can be found in the Calendar Grid under Manage Calendars.
  2. tag="tag" (calendar or tag required) specifies the Handle of a tag who's events are to be rendered in the grid.
  3. number="n" (optional) indicates the maximum number of items to show. If not specified, all upcoming events, hooked to that calendar or tag, are shown.

Event Button

The Event Button shortcode renders a button, that when clicked, takes the user to the event's Landing Page on the CouncilWare Service App.

Syntax
  1. [cw_event_button id="n" text="text"]
Parameters
  1. id="n" (required) is the Event ID of the event. The ID of the event can be retrieved from the CouncilWare Service App.
  2. text="text" (optional) is the text to be displayed on the button. If not specified, the name of the event is shown on the button.

Event Registration Button

The Event Registration Button shortcode renders a button, that when clicked, takes the user to the event's Registration Page on the CouncilWare Service App.

Syntax
  1. [cw_event_registration_button id="n" text="text"]
Parameters
  1. id="n" (required) is the Event ID of the event. The ID of the event can be retrieved from the CouncilWare Service App.
  1. text="text" (optional) is the text to be displayed on the button. If not specified, the name of the event is shown on the button.
The Unit Search shortcode renders a set of tools that users can use to search for units in your council. The tool will search the units you have defined in the MyCouncil SvcApp (it does not connect to national in any way) and display them to end users. Users can then click on the search results and see information about those units. The information displayed in the search results are determined by the settings each unit configures in their Unit DashBoard and can include leadership names and contact information, meeting dates and times and other similar information.


Syntax
  1. [cw_unit_search]
Parameters
  1. None