British Member of Parliament Profile

This plugin provides a way to query Parliament’s database and return a profile of an MP in the House of Commons, using a shortcode. All you need is their constituency name or postcode, and the magic is done for you! Possible usage for this includes:
- Campaigning for an issue and offering a way for readers to contact your local MP
- Providing basic information on an MP relevant to your content or news story
- Raising awareness about who to consult with regarding local issues
This plugin relies on the data offered by the third party service of UK Parliament Data to return the information and portrait in the profile based on a constituency. This data is licensed under the Open Parliament Licence – there are no additional Privacy Policies from UK Parliament Data relating to this plugin. In order to find your parliamentary constituency based on your postcode, the third party service of Postcodes.io is used.
Instructions
In order to render a profile, use the following shortcode structure: [profilemp constituency=”Leeds Central”]
Or with a postcode: [profilemp postcode=”LS1 4DY”]
Ensure that you replace the constituency/postcode with the one of the MP with the profile that you wish to render!
If you’re using a parliamentary constituency, you’ll need to use the exact name of it, and this can be inserted directly into the shortcode, even if there are characters such as brackets. For example, [profilemp constituency=”Richmond (Yorks)”] would work.
Using a shortcode can be done through the Shortcode Gutenberg block, or in the Classic Editor. You can render as many on a single page as you want, even with different MPs!
Download & install the zip archive
The plugin package installer can be downloaded from the WP2E project tab called “code”.
1 – Select the version to download if this option is available otherwise the “latest” version of the main plugin will be used.
2 – After downloading the zip archive install the plugin package installer in you local environment and activate the script from the plugin list.
3 – Under the section “Plugins” of the admin dashboard you should see a new “Dependencies & Licenses” link. Follow the instructions from this panel to finalize the installation of the missing dependencies.
- Give a name to your project
- Download the Installer Package
- Install & activate the plugin locally
- Install the suggested dependencies
Tips: Use the WP2E panel to add/suggest new dependencies to the local installation. Press F5 in the list of dependencies if the changes are not displayed right away.



