Searching around and not being able to implement the action through init
hook I’ve found this workaround which for sure isn’t the best but does the job nicely.
echo "<script type="text/javascript">
window.location=document.location.href;
</script>";
at the end of $_POST
instructions.
If somebody has a better solution, welcome to share.
Related Posts:
- How to properly refresh page after form action?
- Convert hyphen to underscore in permalinks
- Init action and refresh page after form action
- Postback redirect through add_action is not triggered
- How to change form action of wp-login page with a function
- Sending Messages Back to the Template After Processing?
- remove_action on after_setup_theme not working from child theme
- Remove Actions/Filters added via Anonymous Functions
- Difference between the_permalink() and get_permalink() function
- Trying to use add_action and do_action with parameters
- Check if post is being published for the first time, or is an already published post being updated
- Use author author display name in permalink structure for pages and posts
- How to use the do_action () with parameter
- Perform an action when post is updated/published
- paginate_links() don’t properly work in search.php?
- WordPress Theme Update Action?
- Extract image from content and set it as the featured image
- Do WordPress’ cron’s clean up expired transients?
- add_action in a function, is it possible?
- How can I get $id variable in widget’s form function?
- Using a private method as an action callback from within a class
- contactform7 remove tags with “wpcf7_autop false” from functions.php
- How to restrict actions and filters “properly” by conditions
- How to count number of functions attached to an action hook?
- Add action hook conditionally – only when home.php in use
- Using add_filter() in Widgets
- Add new user : make the fields First Name and Last name required
- How to call WordPress functions from a form processing script
- How can I tell if I’m on a login page? [duplicate]
- what is the meaning of settings_fields()
- Change meta tags programatically
- Using get_terms for custom taxonomy in functions.php
- Fatal error: Call to undefined function add_action() – an untouched problem
- How to hook into the quick edit action?
- Reuse variable in hook callback
- update_post_meta for custom field not working upon form submission
- Call to undefined add_action() in theme’s functions.php
- WooCommerce add_action hook results in 500 error
- Automatically Add Specified Value to Attachment Metadata upon Upload
- Adjust which tempalte a page uses with a function?
- Generate permalinks
- Can’t Update function.php after writing short code
- How to update feed only 2-3 times a week (for Feedburner email)?
- Disable shortlinks like ?p=1234 to prevent scraping
- WordPress registration and contact form 7 [closed]
- How would go about if I just want a temporary function?
- Passing arguments to my function with do_action and add_action is not working
- Pass parameters to function through an action
- Accepted arguments value in hook functions
- How to select a page within admin?
- How to manage arrays from custom functions stored in functions.php?
- How do I pass arguments for multiple functions hooked to a single action?
- Which action hook to use for function?
- Gravity Forms – Using a Form to Pre-populate A Gravity Form [closed]
- Ninja form Redirect depending on text field content [closed]
- Manipulate Permalink
- Custom HTML in specific category single page and its descendant categories
- WordPress upload_mimes not working for front-end uploads of 3D files
- Ajax not working properly
- Modify a function without editing template
- Don’t delete a page if it holds users
- How do I add Bootstrap and LESS to my migrated WordPress site?
- Having a Function Inside of the Loop
- Which action does wp_update_user triggers?
- How can I get my Script to work on the Login page?
- Trigger a custom function when option are saved in admin area
- Removing custom meta data
- Is there an alternative to get_template_directory_uri()?
- Reuse variable in hook callback
- Wait a result before enqueue
- Redirect to another page if the user is logged in when pressing again the login button on menu bar
- Multiple Loops Meta Data
- How to get correct URLs in network wide menu (Multisite)?
- Where to add the permalink in this function?
- paginate_links() don’t properly work in search.php?
- Function added using `add_action()` not being called
- Difference b/w Simple function call & do_action call
- jQuery does not work
- Override the WordPress core function wp_referer_field
- Set Taxonomy based on post status
- Is There Any Built In WP Functionality For Combining Form Fields To Return Specific Data
- Two functions with different arguments and add_actions, but identical code
- How to fix get_the_category function returning incorrect slug?
- add_action template_redirect not working for home page
- I can’t seem to install Font Awesome locally [closed]
- AMP – Change rel=”canonical” from functions.php [closed]
- wp_nonce_field is breaking form for reasons unknown
- Scripts not loading when using the wp_enqueue_scripts action
- Is there a way to prevent a function/method from being called outside a specific hook?
- Test if a post exists by category and date
- Auto-Tweet if Type is ‘Status’ using OAuth
- Missing argument for the function
- problem loading stylesheets to wp_head dynamically
- current_user_can comma list vs OR (||) list
- Adding code before post title with the_title produces weird results
- Add back in child theme what the parent theme removed with remove_action
- login_headertitle is deprecated since version 5.2.0
- Contact Form 7 If Condition
- 400 Bad Request – JavaScript App calling Custom wp-json endpoint
- Setting Permalinks in wp_config or functions file?