Description
Connect WordPress to live data from your other systems — and stop updating the same information in two places.
EfficiencyNext Data Connector fetches JSON from any REST API and displays it on your WordPress pages and posts. Connect an endpoint once, and the page shows whatever the source system says today.
Use it for job openings, prices, products, availability, directories, schedules, events, statistics, or any other structured information another system already maintains.
No copying and pasting. No duplicate data entry. No re-importing spreadsheets.
What you can display
- Job openings from an applicant tracking system
- Products or pricing from an ERP or inventory system
- Availability from a booking or scheduling system
- Staff, provider, or member directories
- Events and schedules
- Statistics and key figures
- Articles, resources, and FAQs
- Custom data from your own applications
If your system can return JSON from a URL, Data Connector can display it.
How it works
- Enter your API endpoint and, if it needs one, how to authenticate.
- Click Preview API to see the live response. Every field in it is listed for you.
- Build an HTML template by clicking the fields you want, such as
{{name}}or{{price}}. - Click Preview template to see the result rendered with real data, before you save.
- Add the shortcode or placeholder to any page or post.
From then on the page follows the source system. There is no export to schedule and no theme file to edit.
A quick example
Say your applicant tracking system returns this:
{"jobs":[{"title":"Nurse","location":"Austin"},{"title":"Analyst","location":"Remote"}]}
Save it as a data source named Jobs with this template:
<ul>{{#jobs}}<li>{{title}} ({{location}})</li>{{/jobs}}</ul>
Then put this on your Careers page:
[effcncynxtdc source="Jobs"]
The page lists both jobs. When a job is added or closed in the source system, the page changes with it.
Works with secured APIs
Most business APIs require authentication. Data Connector supports the three methods you are most likely to be given:
- OAuth 2.0 (client credentials) — enter the token URL, client ID, and client secret. The plugin requests an access token, reuses it until shortly before it expires, and gets a new one on its own.
- API key — sent as a header or as a query parameter, under any name your API expects.
- Basic Auth — username and password.
Save credentials once as a reusable authentication profile and share it across as many data sources as you like. Secrets are stored in your WordPress database and are never sent back to the browser, not even to the settings screen.
Fast pages, even when the API is slow
Your visitors should not wait on someone else’s server.
- Responses are cached, with a lifetime you set per data source
- When cached data expires, visitors still get it instantly while a refresh runs in the background
- If the API goes down, the last good data keeps showing instead of an empty page
- Pages that do not use the plugin are not affected at all
You control the layout
Templates are plain HTML with Mustache-style tags: {{variable}} for a value, {{#items}}...{{/items}} for a loop, and dot notation for nested fields.
The plugin ships a stylesheet for the layouts people need most — tables, card grids, product listings, pricing tables, team directories, stats panels, FAQs, event schedules, and more — responsive, with light and dark themes. Change one accent color to match your brand, or edit the whole stylesheet on the Appearance tab.
Secure by default
Every value from the API is escaped on output. Every template is sanitized with WordPress’s own wp_kses, so script and iframe tags cannot reach your pages.
Optional: let AI write the template
You do not need AI to use Data Connector, and nothing is locked behind it.
If you would rather describe a layout than write HTML, add your own API key for OpenAI, Anthropic Claude, or Google Gemini. The generator is given the field names your API returns — not the values — and writes an editable template from them. Requests go directly from your site to the provider you chose, on your own account. There is no EfficiencyNext subscription.
For developers
- One file, no external dependencies, PHP 8.0+
- Shortcodes accept per-use URL and template overrides
- URL parameters can come from the page’s query string, for detail pages such as
?id=42 - All CSS is scoped to one container, so nothing leaks into your theme
- Fully internationalized and translation ready
Your application owns the data. WordPress displays it. Data Connector keeps the two connected.
External services
This plugin connects to services outside your site. None of them are operated by EfficiencyNext, and the plugin sends nothing to EfficiencyNext.
The APIs you configure
For each data source you create, the plugin requests the API URL you entered and sends the credentials you configured for it. If the source uses OAuth 2.0, it also sends your client ID and client secret to the token URL you entered. This happens when a page showing that data is viewed and the cached copy has expired, when a background refresh runs, and when you click Preview API or Preview template. If the API URL contains a parameter such as {{id}}, that value is taken from the visitor’s page URL and included in the request. The terms and privacy policy that apply are those of whichever API you connect.
AI providers (optional)
Nothing is sent to an AI provider unless you save a provider API key on the AI Settings tab and then click Test Connection or Generate Template. When you do, the plugin sends your API key, the layout you chose, any instructions you typed, and the field names found in your API response to the one provider you selected. Values from your API response are not sent.
- OpenAI —
https://api.openai.com/— Terms of use, Privacy policy - Anthropic (Claude) —
https://api.anthropic.com/— Commercial terms, Privacy policy - Google Gemini —
https://generativelanguage.googleapis.com/— Gemini API terms, Privacy policy
Installation
Minimum Requirements
- WordPress 6.0 or greater (tested up to 7.1)
- PHP version 8.0 or greater (8.3 recommended)
- An API endpoint that returns JSON
- WP-Cron enabled, for background refreshes (the plugin still works without it)
Automatic installation
Automatic installation is the easiest option. Log in to your WordPress dashboard, go to Plugins → Add New, search for “EfficiencyNext Data Connector,” and click Install Now, then Activate.
Manual installation
Download the plugin, upload the efficiencynext-data-connector folder to /wp-content/plugins/ on your server, then activate the plugin through the Plugins menu in WordPress. See the WordPress documentation on manual plugin installation for details.
Updating
Automatic updates work as normal. Your data sources, authentication profiles, and custom stylesheet are stored in the database and are preserved across updates.
Setting up your first data source
- Go to Settings → Data Connector and click Add New Source
- Enter a Source Name (used with shortcodes and for identification)
- A Placeholder is auto-generated (for example
{{Positions}}) — this is what goes in your page or post content - Enter your API URL that returns JSON data
- If the endpoint needs credentials, set Authentication — OAuth 2.0, API key, or Basic Auth, as a saved profile or inline. The preview requests use it too
- Click Preview API to see the JSON response and the available template fields
- Create your Template using Mustache-style syntax — click the listed fields to insert them
- Click Preview template to see it rendered with a live API sample and the plugin’s styles before saving
- Toggle Inline if the placeholder appears within a paragraph rather than on its own line
- Save, then paste the placeholder into any post or page
Template syntax reference
{{variable}}— Display a simple value{{#section}}...{{/section}}— Loop over arrays or conditional sections{{#nested.section}}...{{/nested.section}}— Loop over an array nested inside an object{{#.}}...{{/.}}— Loop when the API returns a bare array of items{{^section}}...{{/section}}— Show content when a value is empty or missing{{.}}— Current item in a simple loop{{object.property}}— Access nested properties with dot notation
Shortcode reference
[effcncynxtdc source="SourceName"]— Render a configured data source[effcncynxtdc source="SourceName" url="https://..."]— Override the API URL[effcncynxtdc source="SourceName" template="<b>{{name}}</b>"]— Override the template[effcncynxtdc_inline source="SourceName"]— For inline usage
Settings tabs
Beyond your data sources, Settings → Data Connector has tabs for Authentication (reusable credential profiles), Appearance (the editable front-end stylesheet), Caching (cache lifetime, stale grace window, tracked variants, and a Clear Cached Responses button), and AI Settings (optional: provider and API key for template generation).
FAQ
What kinds of API can I connect?
Any URL that returns JSON over HTTP or HTTPS. The endpoint can be public, or protected with an API key, Basic Auth, or OAuth 2.0 client credentials.
Does it support OAuth 2.0?
Yes, from version 2.1.0. Choose OAuth 2.0 (Client Credentials) as the authentication type and enter the token URL, client ID, client secret, and an optional scope and audience. The plugin exchanges those for an access token and sends it as a Bearer token with each API request.
The token is cached and reused until shortly before it expires, so a page view does not normally cost an extra round trip. If the API rejects a token early, the plugin requests a new one and retries once.
If the token endpoint rejects your credentials, switch Send Credentials As between Request body and Basic auth header. Providers differ on which one they accept.
What is the Audience field for?
Some OAuth providers, Auth0 among them, will not issue a token unless the request names the API the token is for. If your provider gave you an audience or API identifier along with the client ID and secret, enter it there. Otherwise leave it blank and nothing extra is sent.
Which OAuth flows are supported?
The client credentials grant, which is the server-to-server flow: your site authenticates as an application, with no person signing in. This is the flow to ask your API provider for.
Flows where a user signs in and approves access in a browser (authorization code) are not supported. If your API can also issue a long-lived token or API key, you can use that with the API key option instead.
Do I need AI or an AI account?
No. Fetching, caching, templates, shortcodes, and styling all work without it. AI template generation is an optional helper that stays switched off until you add your own provider key.
What PHP version is required?
PHP 8.0 or higher is required. The plugin is fully tested with PHP 8.3.
How do I use shortcodes?
Add [effcncynxtdc source="YourSourceName"] in your post or page content. The source name must match a configured data source. You can optionally override the URL or template via shortcode attributes.
Can I use dynamic URLs?
Yes. Put a parameter in the API URL, for example:
https://api.example.com/data?id={{id}}
{{id}} is replaced with the `id` query parameter of the page being viewed, so one page can show any record: `/product/?id=42`.
How do I loop over an array?
Use section tags:
{{#items}}<li>{{name}}</li>{{/items}}
Is the output secure?
Yes. All variable output is automatically HTML-escaped to prevent XSS attacks. Templates are sanitized using WordPress’s wp_kses function, which strips dangerous HTML tags like script, iframe, and form elements while preserving safe formatting tags.
How is API data cached?
Each data source has a Cache Lifetime (default 300 seconds). Within that time, visitors get the stored response and never wait on your API.
When the lifetime runs out, visitors still get the stored copy instantly while the plugin fetches a new one in the background. If the API is down, the last good copy keeps showing for up to the Stale Grace Window (default 24 hours) instead of an empty page. A failed request is not retried for 60 seconds, so a dead API cannot slow your site down.
To change this behaviour:
- Set Cache Lifetime to 0 for real-time data. Every page view then waits on the API.
- Set Stale Grace Window to 0 to never show expired data, for example for prices or stock levels. Visitors then wait for each refresh, and see nothing if the API is down.
- Click Clear Cached Responses on the Caching tab to discard everything now. Saving a data source, an authentication profile, or the cache settings also clears it.
My data is not refreshing in the background. Why?
Background refreshes run through WP-Cron, which is triggered by visits to your site. A refresh therefore lands shortly after the next page view, not on a timer.
If DISABLE_WP_CRON is set, refreshes wait for your system cron to call wp-cron.php; the Caching tab warns you about this. If your host blocks loopback requests, which is common on local development sites, background refreshes cannot run and a visitor waits for the fetch instead.
What does Tracked Variants Per Source do?
It only matters when the API URL contains a parameter, such as https://api.example.com/items?id={{id}}. Each distinct value of id is cached separately, and each of those is a variant.
The setting (default 20) limits how many variants per source are refreshed in the background. Other values are still fetched and cached on demand, under a site-wide rate limit, so nobody can flood your API by requesting thousands of different ids. Set it to 0 if the parameter can take unlimited values, such as a product id.
Does the plugin slow down pages that do not use it?
No. Content is only processed when the post or page actually contains a placeholder — the plugin checks for the {{ marker before doing anything else. Shortcodes only run when present, as usual. Titles are checked the same way. Excerpts never trigger an API request: any placeholder is removed instead, because an excerpt is truncated to a few dozen words and the fetched data would be discarded.
How do reusable authentication profiles work?
Go to Settings → Data Connector → Authentication and create a profile with your OAuth 2.0, API Key, or Basic Auth credentials. Then, on any data source, pick that profile from the Authentication dropdown instead of re-entering credentials. Updating the profile updates every source that uses it. A profile that is still in use cannot be deleted. Sources created before 2.0.0 keep their own inline credentials and continue to work unchanged.
Do I need to pay EfficiencyNext to use the AI template generator?
No. The generator is bring-your-own-key (BYOK): you supply an API key for OpenAI, Claude (Anthropic), or Google Gemini on the AI Settings tab. Requests go directly from your site to the provider you choose, and usage is billed to your own provider account. This plugin does not proxy your data through any EfficiencyNext service.
How do I generate a template with AI?
- Configure a provider and API key on the AI Settings tab
- Open a data source and click Generate with AI — if you have not run Preview API yet, the plugin fetches a sample automatically so it knows your real field names
- Pick a page type (Data Table, Card Grid, Product Listing, and so on), or choose Other and describe what you want
- Click Generate Template — the result is sanitized, written straight into the Template field, and shown in the Live Preview so you can keep it or generate again
Generated templates go through the same wp_kses sanitization as hand-written ones, so a model cannot introduce script or iframe tags.
How is the rendered output styled?
The plugin ships its own front-end stylesheet, so your data looks consistent everywhere it appears — you do not style templates individually. Templates stay structural: they attach a small set of plugin CSS classes (for example a striped data table, a responsive card grid, a pricing table, or a stats panel) and the stylesheet handles spacing, borders, colors, and light/dark themes. The AI generator applies these classes for you. The output is wrapped in an .effcncynxtdc container that scopes every rule, so nothing leaks into your theme, and you can restyle every source at once by overriding the stylesheet’s CSS custom properties (accent color, borders, radius, and so on). Inline styles are discouraged but still permitted for manual one-off tweaks.
How do I add my own CSS?
Go to Settings → Data Connector → Appearance. The box there holds the full stylesheet for rendered output and is pre-loaded with the plugin’s built-in styles, so every class and design token is visible and editable. Change any rule; your version is stored in the database (not in a plugin file), so it survives updates, and it is used in place of the built-in styles. The quickest way to rebrand everything at once is to override the design tokens near the top, for example:
.effcncynxtdc { --effcncynxtdc-accent: #c0392b; --effcncynxtdc-radius: 4px; }
Clear the box entirely to fall back to the built-in styles, or click Reset to defaults to reload the current built-in styles into the editor (then Save). The stylesheet only loads on pages that actually render a data source.
Can I preview a template before saving?
Yes. Click Preview template in the source editor to render the current template — saved or not — with a live sample from your API and the plugin’s own styles, exactly as it will appear on your site. The preview runs through the same template engine and sanitizer as the front end and displays in an isolated frame, so nothing from the admin screen affects how it looks. Generating a template with AI shows this preview automatically.
Where is my AI API key stored?
In the WordPress options table, alongside your other plugin settings. It is never sent to the browser: the admin screen only shows whether a key is stored. Deleting the plugin removes it.
Can I translate the plugin?
Yes. EfficiencyNext Data Connector is fully internationalized. Place your translation files in the wp-content/plugins/efficiencynext-data-connector/languages/ directory using the text domain efficiencynext-data-connector (e.g., efficiencynext-data-connector-fr_FR.po). All admin interface strings, including JavaScript-rendered text, are translatable.
What HTML tags are allowed in templates?
Templates support common structural and formatting tags including: table elements, divs, spans, paragraphs, headings, lists, links, images, strong, em, code, pre, and semantic HTML5 elements. Script, iframe, form, and other potentially dangerous tags are stripped.
Screenshots







Changelog
2.1.0
OAuth 2.0
- New authentication type: OAuth 2.0 client credentials. Enter a token URL, client ID, client secret, and optional scope, on a data source or in a reusable authentication profile
- Optional Audience field, for providers such as Auth0 that require one before issuing a token
- Access tokens are cached and reused until shortly before they expire, so a page view does not normally add a token request
- If the API answers 401 with a cached token, the plugin requests a new token and retries once
- Client credentials can be sent in the request body or as a Basic auth header, to match what the token endpoint accepts
- A failing token endpoint is not retried for 60 seconds, so it cannot slow down every page view
- Token endpoint errors are reported in Preview API, including the OAuth error code when the provider returns one
- The client secret is never sent to the browser
2.0.0
Authentication
- Reusable authentication profiles: save Basic Auth or API Key credentials once and select them on any data source
- Profiles in use cannot be deleted; existing sources with inline credentials keep working unchanged
- New Authentication tab on the settings screen
- Stored secrets are never sent to the browser; the admin UI reports only whether a value exists
AI template generation
- New AI Settings tab. BYOK: choose OpenAI, Claude (Anthropic), or Google Gemini and supply your own API key, with a Test Connection check
- Model picker: choose from a list of known models for the selected provider, or pick Custom to enter any model id your key can access
- AI template generation on the source editor: pick a predefined page type or supply your own prompt
- Generated templates embed the real field names discovered by Preview API, and are sanitized with wp_kses before insertion
- Clicking Generate with AI now fetches an API sample automatically when none has been captured yet, so the model always has your real field names
- Generated templates now use the plugin’s CSS classes for a consistent look instead of inline styles, and appear in the Live Preview immediately so you can keep them or generate again
Front-end styling
- Rendered output is now styled by a bundled, theme-scoped stylesheet, so every data source looks consistent across the site without styling templates individually
- Styling covers 11 layout types: data table, card grid, list/feed, product listing, pricing table, team directory, article feed, stats dashboard, FAQ, event schedule, and testimonials
- Data tables support composable modifiers — striped, bordered, compact, and hover
- Pricing tables support a featured-tier highlight; cards, products, and team cards lift on hover; stats can show their numbers in the accent color; FAQs can be boxed
- Light and dark themes are handled automatically, and a small set of CSS custom properties (accent color, borders, radius, shadows) lets you rebrand everything at once
- All rules are scoped to an
.effcncynxtdccontainer so nothing leaks into your theme, and the stylesheet loads only on pages that actually render a source - New Appearance tab with an editable stylesheet: pre-loaded with the full built-in styles so every class and design token is visible, stored in the database (so it survives plugin updates) and used in place of the defaults, with a Reset to defaults button and a clear-to-revert fallback
Caching and background refresh
- API responses are now cached, with a per-source Cache Lifetime (default 5 minutes, 0 to disable)
- Background refresh: stale data is served instantly while a refresh runs in a separate process via WP-Cron, so only the first request for a source ever blocks
- Stale-on-error: when a refresh fails, the last known good response keeps being served rather than rendering an empty template
- New Caching tab with a site-wide Stale Grace Window (default 24 hours; 0 disables stale serving)
- New Tracked Variants Per Source setting (default 20) for sources whose URL contains {{parameters}}
- Warm variants are refreshed in the background; a new variant can only take a slot from one idle for a week, so a spray of unique parameter values cannot displace real traffic
- Added a Clear Cached Responses button on the Caching tab; saving a source, a profile, or the cache settings also clears the cache
- The Caching tab warns when DISABLE_WP_CRON would delay background refreshes
Performance
- Failed requests are cached for 60 seconds, so an unreachable API can no longer exhaust PHP workers and take a site down
- Responses are memoized per request, so the same URL is fetched once even though
the_contentruns several times per page - Content is only processed when the post actually contains a placeholder
- Excerpt generation no longer triggers API requests; placeholders are stripped instead
- Titles are checked for template syntax before any work is done
- Request timeout reduced from 15s to 5s on the front end (the admin Preview API button still allows 15s)
- Content and title filters no longer run in the admin
Security
- Site-wide rate limit on uncached fetches for variants outside the warm set, closing an API amplification vector
- Background refresh jobs carry only a source id and the query vars the URL uses — never a resolved URL, which can contain an API key, and which WordPress would store in plaintext in the autoloaded cron option
Admin interface
- Editor layout reworked: the API response and its clickable fields now sit beside the template editor, so you build a template while looking at your data instead of scrolling between them
- Live Template Preview: render the current template with a live API sample and the plugin’s own styles inside the editor, in an isolated frame, before saving — using the same engine and sanitizer as the front end
- Progress indicators: fetching an API sample, generating a template with AI, and rendering the preview now show an animated progress bar or spinner with step-by-step status, so long operations no longer look frozen
Fixed
- AI template generation now grounds on the real shape of your API response: fields that live inside an array are shown to the model as belonging to that loop, instead of being listed as though they sat at the top level
- AI template generation now handles an API that returns a bare array of items, rather than generating a template with no loop at all
- Section tags accept dot notation, so a nested array can be looped with
{{#data.items}}; previously only top-level arrays could be looped - Clicking a loop field in the API response now inserts its full path, matching what the renderer resolves
- A placeholder not wrapped in paragraph tags caused the request to be made and the raw placeholder left on the page
- Authentication profiles and AI settings are no longer autoloaded on every request
Uninstall
- Uninstall now removes the authentication profile and AI settings options, queued refresh jobs, and the variant registry
1.0.1
- Added support for Basic Authentication and API Key Authentication
1.0.0
- Initial release for WordPress.org
- Modern admin interface with add/edit/delete source management
- AJAX-powered settings with modal editor
- API preview with automatic field discovery
- Template helper toolbar with common patterns
- WordPress shortcode support: [effcncynxtdc] and [effcncynxtdc_inline]
- Input sanitization: wp_kses for templates, esc_url_raw for URLs, placeholder validation
- Mustache-style template engine with loops, conditionals, inverted sections, and dot notation
- Zero external dependencies, PHP 8.0+ compatible
- Full internationalization (i18n) with load_plugin_textdomain and translatable JavaScript strings
- Automatic migration from pre-release storage format
