WP Manifestindependent plugin directory
manifest / developer / htmxer

@ HTMXer

HTMX for WordPress

★ 1stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/aiiddqd/htmxer/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

HTMX for WordPress

example

initial HTML with HTMX

<div hx-get="/wp-json/htmxer/toolbar" hx-trigger="load delay:0s" hx-swap="outerHTML"></div>

url https://github.com/aiiddqd/aab/blob/main/main.php

AJAX response

add_action('htmxer/toolbar', function ($context) {
    echo 'Hello World';
});

Context (optional)

add_filter('htmxer/context', function ($context) {
    global $wp;
    $post_id = get_post()->ID ?? null;
    $context['post_id'] = $post_id;
    $context['url'] = site_url($wp->request);
    return $context;
});