Complete reference for all NextPress exports.
| Export | Description |
|---|
| WPHead | Renders all <head> assets: global styles, stylesheets, import map, and header scripts |
| WPFooter | Renders footer/body scripts |
| Content | Renders WordPress HTML content with layout classes and custom parsers (wraps output in [data-rendered]) |
These are used internally by WPHead / WPFooter. Available for advanced use cases but not needed in most apps:
| Export | Description |
|---|
| WPScripts | Core script renderer (classic, deferred, async, ES module) |
| GlobalStyles | WordPress global stylesheet, custom CSS, and font faces |
| Stylesheets | WordPress enqueued stylesheets with inline styles |
| ImportMap | Script module import map (@wordpress/interactivity, etc.) |
| Export | Description |
|---|
| AssetUpdater | Refreshes assets on client-side navigation (includes synthetic page events) |
| PageEvents | Fires synthetic WordPress lifecycle events (for apps not using AssetUpdater) |
| Export | Import Path | Description |
|---|
nextImageParser | @axistaylor/nextpress/client | Converts <img> to next/image for WebP/AVIF optimization |
createUrlRewritingParser | @axistaylor/nextpress | Rewrites WordPress URLs to Next.js routes (used internally by Content) |
| Export | Import Path | Description |
|---|
usePageEvents | @axistaylor/nextpress/client | Fires synthetic DOMContentLoaded/load events on mount and pathname change |
firePageEvents | @axistaylor/nextpress/client | Imperative function to dispatch page events |
| Export | Import Path | Description |
|---|
| withWCR | @axistaylor/nextpress/withWCR | Next.js configuration wrapper |
| proxyByWCR | @axistaylor/nextpress/proxyByWCR | Middleware proxy for WordPress APIs |
// Server components (render in <head> and <body>)
import { WPHead, WPFooter, Content } from '@axistaylor/nextpress';
// Client components, hooks, and parsers
import {
AssetUpdater,
PageEvents,
usePageEvents,
firePageEvents,
nextImageParser,
} from '@axistaylor/nextpress/client';
import type { AssetData } from '@axistaylor/nextpress/client';
// Configuration (separate entry points)
import { withWCR } from '@axistaylor/nextpress/withWCR';
import { proxyByWCR } from '@axistaylor/nextpress/proxyByWCR';
// Types
import type {
CustomParser,
GlobalStylesType,
EnqueuedScript,
EnqueuedStylesheet,
ScriptTypeEnum,
} from '@axistaylor/nextpress';
import type { WPImport } from '@axistaylor/nextpress';
- Getting Started — Installation and setup
- Parsers — Content parsers (nextImageParser, custom parsers)
- Page Events — WordPress script lifecycle in headless environments
- Multi-WordPress Setup — Multiple backend configuration