Neut Widget WordPress Quickstart

This guide shows the shortest production-safe path for adding Neut widgets to a WordPress website using the Neut Widgets plugin.

In this integration model, WordPress stores the Neut settings, generates fresh iframe URLs on the server, and signs the bootstrap assertion in PHP. The browser must not create Neut widget tokens or sign bootstrap assertions.

For non-WordPress implementations, use the Customer Widget Quickstart, Customer Widget Reference, and Customer Widget Backend Guide.

Integration Flow

  1. Install the Neut Widgets plugin in WordPress.
  2. Activate the plugin.
  3. Configure the tenant-specific Neut settings in WordPress admin.
  4. Add one or more Neut widgets to the page using a block or shortcode.
  5. WordPress renders a widget placeholder into the page HTML.
  6. Frontend JavaScript asks WordPress for a fresh embed_url.
  7. WordPress validates the widget input and signs a short-lived bootstrap assertion.
  8. The browser loads the hosted Neut iframe.
  9. If the widget session expires, the iframe requests a refreshed embed_url from WordPress.

Before You Start

Neut will provide these values:

widget_tenant_id
neut_mint_key_id
neut_mint_secret

You must also know the exact website origin where the plugin will run:

host_origin

Example:

https://www.customer-site.com

host_origin must be the exact site origin, with no path, query string, or trailing slash.

Step 1: Install The Plugin

In WordPress admin:

  1. Go to Plugins -> Add New Plugin -> Upload Plugin.
  2. Upload the Neut Widgets zip package provided by Neut.
  3. Click Install Now.
  4. Click Activate Plugin.

Updating The Plugin

When Neut provides a newer plugin zip:

  1. Go to Plugins -> Add New Plugin -> Upload Plugin.
  2. Upload the new Neut Widgets zip package.
  3. WordPress will detect that the plugin is already installed.
  4. Confirm that you want to replace the existing version with the new one.

The plugin settings should remain in place during a normal update, so customers should not need to re-enter:

  • widget_tenant_id
  • neut_mint_key_id
  • neut_mint_secret
  • host_origin

Step 2: Configure The Plugin

After activation:

  1. Go to Settings -> Neut Widgets.
  2. Enter widget_tenant_id, neut_mint_key_id, neut_mint_secret, and host_origin.
  3. Save the settings.

The plugin uses the Neut widget host automatically:

https://widgets.neut.us

Customers do not need to enter that value manually.

Step 3: Add A Widget

The plugin supports three widget IDs:

  • bill-preview
  • vote-breakdown
  • legislation-by-subject

You can add them either with the WordPress block editor or with shortcodes.

Option A: Use Blocks

In the block editor:

  1. Add the Neut widget block you want.
  2. Open the block inspector sidebar.
  3. Enter the widget settings there.
  4. Publish or update the page.

Supported blocks:

  • Bill Preview
  • Vote Breakdown
  • Legislation By Subject

Option B: Use Shortcodes

If the site uses shortcodes, you can add one of the plugin shortcodes directly into the page content.

Supported shortcodes:

  • [neut_bill_preview ...]
  • [neut_vote_breakdown ...]
  • [neut_legislation_by_subject ...]

Step 4: Example Widget Configurations

Bill Preview

Use this widget when the page is about a specific bill.

Shortcode example:

[neut_bill_preview
  instance_id="bill-preview-article-123-main"
  bill_type="HR"
  bill_number="1"
  congress="119"
  article_id="article-123"
  colorway="Default"]

Vote Breakdown

Use this widget to show House roll call votes for a representative, or a general House roll call feed.

Representative example:

[neut_vote_breakdown
  instance_id="vote-breakdown-lofgren-ca-18"
  member_type="Representative"
  last_name="Lofgren"
  state_code="CA"
  district="18"
  congress="119"
  limit="5"
  colorway="Paper"]

General feed example:

[neut_vote_breakdown
  instance_id="vote-breakdown-general-feed"
  congress="119"
  limit="5"
  colorway="Paper"]

Legislation By Subject

Use this widget on a policy or issue page, either for a single member or for general legislation on that subject.

Representative example:

[neut_legislation_by_subject
  instance_id="legislation-lofgren-health"
  member_type="Representative"
  last_name="Lofgren"
  state_code="CA"
  district="18"
  congress="119"
  subject="Health & Social Welfare"
  status_filter="All"
  show_subject_filter="false"
  show_status_filter="false"
  limit="10"
  colorway="WashedSage"]

General subject example:

[neut_legislation_by_subject
  instance_id="legislation-health-general"
  congress="119"
  subject="Health & Social Welfare"
  status_filter="All"
  limit="10"
  colorway="WashedSage"]

Step 5: Verify The Widget

  1. Open the page on the live site.
  2. Confirm the widget loads.
  3. Confirm the iframe resizes correctly.
  4. Confirm no validation error message appears in place of the widget.

Common Notes

  • Use a stable instance_id for each widget placement.
  • instance_id may contain letters, numbers, dot, underscore, colon, or hyphen.
  • For general House roll call views, omit the member-specific fields together.
  • vote-breakdown currently supports House roll call votes only. Senate recorded votes are not available in this widget yet.
  • Keep neut_mint_secret server-side only.

Need More Detail?

For deeper parameter details and integration guidance, see: