WordPress
Add every new WordPress user to a list automatically — no plugin required.
No-code⏱ 5 min
Paste one snippet into your theme and every new WordPress user flows into a Postlys list.
- 1In WP Admin, go to Appearance → Theme File Editor and open
functions.php(or use a Code Snippets plugin). - 2Paste the snippet below and replace
pl_live_xxxwith your key. - 3Save. Register a test account — it appears in your Contacts instantly.
functions.php — fires on every new user
add_action('user_register', function ($user_id) {
$u = get_userdata($user_id);
wp_remote_post('https://app.postlys.com/api/v1/contacts', [
'headers' => ['X-Api-Key' => 'pl_live_xxx'],
'body' => [
'email' => $u->user_email,
'name' => $u->display_name,
'list' => 'Subscribers',
],
]);
});
Newsletter form? Point any form plugin (Contact Form 7, WPForms) to the same endpoint, or use the Zapier recipe.
Ready to try it? Spin up a workspace and grab your key.