Displaying Reports

GovernDocs allows reports 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 meetings. These defaults can be overridden on individual items with shortcode attributes.

Displaying a list of all reports

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

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

Displaying a single report

The report layout includes the report title, description, metadata pills, and a download button for the primary file.

[governdocs_report
id="123"
show_icon="1"
button="1"
class="custom-report-card"
fields="type,report_date,published_date,ext,size,status,owner,report_id"
]

Available attributes

  • id – Displays a specific report 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. Example: show_icon="1"
  • button – Controls whether the download button is shown. Use 1 to show it or 0 to hide it. Example: button="1"
  • class – Adds a custom CSS class to the output. Example: class="custom-report-card"
  • fields – Defines which report fields are displayed and in which order. Example: fields="type,report_date,published_date,ext,size,status,owner,report_id"
  • display – Controls the layout style. Available values are card and full. Example: display="card"
  • title – Lets you show, hide, or override the title. Examples: title="Annual Financial Report", title="1", or title="0"

PRO only attributes

The below attributes are available in the PRO version.

  • desc_location – Controls where the description appears relative to the metadata. Available values are above and below. Example: desc_location="above"
  • allowed_roles – Restricts output so only specific user roles can view the report. Example: allowed_roles="subscriber,customer"
  • blocked_roles – Blocks specific user roles from viewing the report. Example: blocked_roles="guest"
  • blocked_button_text – Sets the fallback button text when access is blocked. Example: blocked_button_text="Log In to Access"
  • blocked_button_url – Sets the fallback button URL when access is blocked. Example: blocked_button_url="https://example.com/my-account"
  • blocked_button_new_tab – Opens the fallback button link in a new tab. Accepted values include 1, true, yes, and on. Example: blocked_button_new_tab="1"
  • blocked_button_class – Adds custom classes to the fallback button. Example: blocked_button_class="button button-primary"
  • blocked_description – Sets custom text shown when access is blocked. Example: blocked_description="This report is available to signed-in users only."

Available report field keys

  • type – The selected report type label.
  • report_date – The report date.
  • published_date – The published date.
  • ext – File extension.
  • size – File size.
  • status – Report status.
  • owner – Report owner.
  • report_id – Internal report ID.