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
- 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?
- 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?
- Changing where my author box is printed
- Insert Content Before div#main from the functions.php File
- Use add_action within template
- Problem in using Customizer
- Problem with custom function when I go back with the browser
- Redirect to post after publish or update a published post
- 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?
- dynamic enquiry form [closed]
- template_redirect action only firing if logged in
- How to use wp_enqueue_script properly?
- This code is supposed to only allow user to be authenticated if accountVerified is equal to 1, but it still allows user to be authenticated otherwise
- How to add extra value to permalink
- 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?
- If has action not working as expected
- 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
- Is_Page doesnt detect my page
- How do you insert code into the sidebar?
- How Do I Unhook This Parent Theme Function?
- Problems adding a new field to product in cart
- How to show only specific category post by user role without plugin and restrict all other cats
- use add_action in a shortcode (gravity form – WordPress)
- wp_footer hook causing text to show on bottom of page
- Button click counter for login user
- Remove action hook from Class, understanding OOP
- WordPress Ajaxifying not working properly
- Which method is more correct for removing WooCommerce Extensions menu item?
- Filter posts on new 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?
- custom COOKIE on custom page
- us states dropdown function and echo in theme template files
- What add_action reference should I be using or should I use do_action?
- Adding custom field in menu options [duplicate]
- Getting error while trying to use custom comment function
- Settings in functions.php used by a plugin
- 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)