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:
- 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
- paginate_links() don’t properly work in search.php?
- WordPress Theme Update Action?
- 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
- How to restrict actions and filters “properly” by conditions
- Add action hook conditionally – only when home.php in use
- Using add_filter() in Widgets
- 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
- 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
- Adjust which tempalte a page uses with a function?
- 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?
- Pass parameters to function through an action
- Accepted arguments value in hook functions
- How do I pass arguments for multiple functions hooked to a single action?
- Which action hook to use for function?
- 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
- 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?
- Is there an alternative to get_template_directory_uri()?
- Reuse variable in hook callback
- Wait a result before enqueue
- Multiple Loops Meta Data
- Where to add the permalink in this function?
- Function added using `add_action()` not being called
- jQuery does not work
- Override the WordPress core function wp_referer_field
- Two functions with different arguments and add_actions, but identical code
- How to fix get_the_category function returning incorrect slug?
- I can’t seem to install Font Awesome locally [closed]
- Scripts not loading when using the wp_enqueue_scripts action
- Test if a post exists by category and date
- Auto-Tweet if Type is ‘Status’ using OAuth
- problem loading stylesheets to wp_head dynamically
- current_user_can comma list vs OR (||) list
- Insert Content Before div#main from the functions.php File
- Use add_action within template
- Problem in using Customizer
- Replace admin header logo with an image
- New checkbox in custom widget isn’t saving data
- How do I find the code executed when wp_head() is called?
- template_redirect action only firing if logged in
- Using get_terms for custom taxonomy in functions.php
- Issue passing action class to nested function. Admin Columns
- Does hook have an effect on increasing the page load?
- How to Override Page Template if URL matches query?
- Save_post – Warning: Cannot modify header information
- What is the earliest Hook a Script can use?
- How do I trigger WP CLI DB export using a PHP function?
- How Can I Create a Friendly Slug for a Dynamic Page?
- Modifying a WordPress Plugin
- Add #primary at the end of navlink permalinks on single posts
- post value to function with Ajax and jQuery
- How Do I Unhook This Parent Theme Function?
- use add_action in a shortcode (gravity form – WordPress)
- wp_footer hook causing text to show on bottom of page
- WordPress hooks to call a function inside a construct
- True parameter but jquery register in header and not in the footer with wp_register_script
- Fatal error: Call to undefined function add_action() – an untouched problem
- Pass arguments to function class with do_action()
- previous_post_link inside of a function?
- What add_action reference should I be using or should I use do_action?
- Check if excerpt is empty at loop-portfolio
- Exclude javascript in certain page url and all following url’s after forward slash
- Gravity Forms After Submission – GFFormsModel::update_lead_field_value?
- function to return comma separated list of meta values
- Do something when user creates post (that’s pending)
- Will my WordPress site become vulnerable after adding this functions which allows more HTML tags for subscribers?
- add variable to actions/functions across different files (woocommerce)
- Help finishing script to export WP user data when form submitted
- Directing to functions.php the correct way
- WordPress Custom wp mail template return full template
- Can’t find function which is called in a wordpress theme
- delete_term is not working properly with add_action()
- How to get variable from other function inside class function using add_action for Ajax call