-
Notifications
You must be signed in to change notification settings - Fork 0
Wordpress
Andreas Ekström edited this page Jul 11, 2026
·
4 revisions
Astro templates can ask the internal WordPress runtime to render real WordPress actions and filters during SSR:
---
import { createHooks } from 'vite-wp/wordpress/hooks';
const hooks = createHooks(Astro.props);
const head = await hooks.action('wp_head');
const content = await hooks.filter('the_content', Astro.props.content);
---
<Fragment set:html={head.rendered} />
<article set:html={content.value} />