Displaying Ordinances

GovernDocs allows ordinances to be displayed on the front end of your WordPress site using a shortcode placed on a page or post.

Field defaults

In the settings of GovernDocs, you can set the default fields to be shown for all ordinances. These defaults can be overridden on individual items with shortcode attributes.

Displaying a list of all ordinances

You can show all ordinances for a certain time period using the below shortcode. The shortcode below will display all ordinances for March 2026. You can leave off the month attribute to show all ordinances for 2026.

[governdocs_all
type="ordinance"
show_toolbar="1"
year="2026"
month="3"
]

Displaying a single ordinance

The ordinance shortcode displays the ordinance title, ordinance details, and document information when a document is available.

[governdocs_ordinance
id="123"
show_icon="1"
button="1"
class="custom-ordinance-card"
fields="ordinance_number,status,introduced_date,adopted_date,effective_date,ext,size"
]

Available attributes

  • id – Displays a specific ordinance by post ID. Example: id="123"
  • show_icon – Controls whether the document icon is shown. Use 1 to show it or 0 to hide it.
  • button – Controls whether the download button is shown. Use 1 to show it or 0 to hide it.
  • class – Adds a custom CSS class to the output.
  • fields – Defines which ordinance fields are displayed and in which order.
  • title – Lets you show, hide, or override the title. Examples: title="Ordinance 2026-14", title="1", or title="0"

PRO only attributes

The following attributes are available in the PRO version.

  • allowed_roles – Restricts output so only specific user roles can view the ordinance.
  • blocked_roles – Blocks specific user roles from viewing the ordinance.
  • blocked_button_text – Sets the fallback button text when access is blocked.
  • blocked_button_url – Sets the fallback button URL when access is blocked.
  • blocked_button_new_tab – Opens the fallback button link in a new tab.
  • blocked_button_class – Adds custom classes to the fallback button.
  • blocked_description – Sets custom text shown when access is blocked.

Available ordinance field keys

The fields available for the fields attributes are:

  • ordinance_number – The official ordinance number.
  • status – The current ordinance status.
  • introduced_date – The date the ordinance was introduced.
  • adopted_date – The date the ordinance was adopted.
  • effective_date – The date the ordinance takes effect.
  • ext – File extension.
  • size – File size.

If you do not supply custom fields, Ordinances display the default fields configured by GovernDocs.