WP Congress comes built in with many great and useful shortcodes that can be used to display information from these data sources on any page on your site.
To use a shortcode, go to the page you want to edit. Above the WYSIWYG you’ll see a Add WP Congress Shortcode button.
Click it and in the popup window, use the dropdown to select the shortcode you want to use.
Once you’ve selected and configured the shortcode (instructions to follow) click “Insert Shortcode” to add it to your page.
In the dropdown are the following shortcodes to choose from:
The Legislator Archive shortcode will display a list of all legislators on your site. You’ll need to configure the pagination for how many legislators to display per page in the Legislators Per Page field (default is 10).
The Legislator Honor Roll shortcode will display all legislators with a voting record at or above a certain percentage. You’ll need to configure what that percent is in the Percent field (default is 90%) and what year you want to pull results for in the Year field.
The Legislator Map shortcode will display a clickable map where a site visitor can click on a state to pull up legislators for that state. There is no configuration needed for this shortcode.
The Legislator Search shortcode adds a search bar for users to use to find legislators either by their address or by the Legislator’s last name. To configure this shortcode, enter in either location (to add a search bar by location) or name (to add a search bar by last name) in the Legislator Search Type field.
If using the address search, the user will enter their address and then has the option for results to show up in order of location (closest to furthest). If using the last name search, the user will then have the option to sort them A to Z or Z to A.
The Vote Search shortcode add a search bar for users to use to find votes based on a certain search criteria. To configure this shortcode, use the Vote Search Default Chamber field to set what chamber the search form should pre-select the chamber. Options are House, Senate or Both. Or leave blank for no pre-select.