perhaps running it on the user_register
hook?
add_action( 'user_register', 'loadAfterUserRegistrationHook' );
function loadAfterUserRegistrationHook(){
add_action( 'user_meta_after_user_register', 'createNewPost' );
}
See: http://codex.wordpress.org/Plugin_API/Action_Reference/register_form
Related Posts:
- when should an action be added to init and when should it be added to wp_head
- What is the entry point of a WordPress theme?
- WordPress ignore init for crawlers
- How to fix “Attempted relative import in non-package” even with __init__.py
- git add . -> still “nothing to commit” with new files
- How to fix “Attempted relative import in non-package” even with __init__.py
- Inheritance and init method in Python
- What is the very earliest action hook you can call?
- Which hook should be used to add an action containing a redirect?
- Marking future dated post as published
- Difference between after_setup_theme and init action hooks?
- WordPress Theme activation hook?
- Use wp init hook to call other hooks?
- Are there any action like ‘init_frontend’
- Init action hook running late after PayPal’s return url?
- When we register a custom taxonomy or post type, does the WP database modified at all?
- Change page title from plugin
- Using get_terms for custom taxonomy in functions.php
- set_query_var doesn’t seem to work on init hook
- Intercept request to /wp-content/uploads/random.file
- add_feed and flush_rewrite_rules
- wp_redirect() not working on form submission with init hook
- WordPress Plugin Boilerplate – add_action hook in static “activate” function
- What is the best filter where to use register_block_type?
- Cron While Editing Post
- Best action hook to create custom post and assign taxonomy terms to it on plugin activation?
- How to insert a text in all pages and posts before or after specific places?
- Stop WordPress Entirely and Run My Own Code
- Get log of function/method calls made by do_action() on WordPress initialization
- Load ajax if is_home()
- Plugins rewrite rules the right way
- How to setcookie if is_page(‘page’) ? should I use add_action(‘init’) or there is another action?
- Problem with is_page & wp_redirect
- Contact Form 7 – Uncaught TypeError: wpcf7.initForm is not a function [closed]
- wp_redirect on base wp-admin and login
- Init plugin again after ajax call finish
- Fire on widgets_init only on dashboard
- $wpdb->insert running multiple times?
- Hooking action once but called twice
- PHP header() gives headers already sent
- Post submit using shortcode and init
- Form Shortcode not saving data to WP database
- Which functions/classes are available during SHORTINIT?
- add_action in a custom plugin
- Plugin init hook fires repeatedly
- Add a filter inside an action init
- Why can’t a custom postype be registered with “admin_init” hook?
- How to hook WP initialization without modifying functions.php
- Basic function call on init failing
- How to do a task only once for logged in users
- add_action(‘init’) not work
- Init action and refresh page after form action
- Action ‘init’ function doesn’t return variable
- Can i use init hook for API purpose?
- Why doesn’t global $wp_query not get hooked?
- How to translate Widget Description in constructor?
- Why do I need to register my custom post type a second time when flushing rewrite rules?
- Developing plugin, where to place action hooks etc?
- Preset Widgets ONLY after site is initially created
- Custom Post Type Dashboard Tab not displaying any posts
- Session management issues with WordPRess 404 Error page
- Using get_terms for custom taxonomy in functions.php
- Set user role, if an specific role created an user
- Store a value in global scope after init hook is fired
- Misleading behaviour on Menu & Theme location
- When/where would want to attach other classes to the base class in a WordPress plugin?
- wp-cron event doesn’t run when custom login API is enabled
- Why should I need to add init action to include PHP file to WordPress Plugin?
- adding an action inside if condition not working
- add_action init breaks site on PHP 7.1
- How to use add_action(‘wp_ajax_[action name]’,…) for a specific page with condition?
- WP_mail() Issue. Duplicate emails if $_GET[‘A’] == email
- Function Hooked on Init Running Multiple Times
- Can I use a hook other than ‘init’ to handle form submissions?
- API calls on plugin activation or init?
- Custom setting field value not working inside add_action init hook
- update_post_meta returning false when called during init
- Init hook for header send
- do_action( ‘init’ ) in wp-settings.php breaks my website. All plugins and themes disabled
- add_action not working in header?
- IE 9 Clears Form Fields
- remove an action hook function on a plugin from a theme
- plugin: ‘init’ hook, check if we’re not in admin
- theme or plugin or server is outputting html before the init hook fires, how is it possible to prevent this
- How to execute init or woocommerce_init only for checkout page
- Best hook for a function which adds shortcodes to the system?
- Best way to disable swap in Linux
- Setcookie not setting cookies anywhere except admin