Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/aiiddqd/htmxer

HTMX for WordPress
https://github.com/aiiddqd/htmxer

htmx woo woocommerce wordpress

Last synced: 15 days ago
JSON representation

HTMX for WordPress

Awesome Lists containing this project

README

        

# htmxer
HTMX for WordPress

# example

## initial HTML with HTMX
```


```
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;
});
```