Saving post doesn’t just happens. Either you are submitting a form or ajax request, which spins up new copy of WP core, which does the saving. Typically that process isn’t meant to produce output and isn’t handling it accordingly.
Depending on what you want to accomplish you will have to either use pure JavaScript for solution or store the message during saving persistently and output it at more appropriate point in the process.
Related Posts:
- Init hook for header send
- How to override parent functions in child themes?
- Issues with title-tag and document_title_parts
- Adding a second email address to a completed order in WooCommerce [closed]
- Import WordPress XML File from Within Functions.php
- Define custom Page Template without its own .php file
- Does hooking into the same action multiple times drain memory?
- How to influence the information displayed on widget inside wp-admin
- How to override a function when isn’t at functions.php
- Extract image from content and set it as the featured image
- Is there a hook or function I can use to display all theme files being used on a current page?
- Issue with get_theme_mod returning a blank value instead of the saved value
- Add action hook conditionally – only when home.php in use
- Show modified time if post is actually modified
- why doesnt is_home() work in functions.php
- Removing custom background and header feature in child theme
- How to create thumbnails for PDF uploads?
- Implementing DNS Prefetching with WordPress
- Help me to understand wp_header() and wp_footer() functions
- How can I tell if I’m on a login page? [duplicate]
- In a WordPress plugin, how do you output HTML code inside the DOM header? [closed]
- In WooCommerce I need to modify the thankyou.php page [closed]
- How can I add an extra WooCommerce hook
- syntax for remove_filter in parent theme with class
- Is it possible to override this function/class in a child theme?
- Why get_header() or get_footer() does not run twice if called in the same php file?
- How to prevent deleting of comments when deleting a post
- Convert hyphen to underscore in permalinks
- Remove Page Title from Static Frontpage
- How to override WordPress registration and insert an auto-generated username?
- Set default options for inserting media
- Change parent theme file function in child themes functions.php
- Adding extra SVGs to TwentyNineteen child theme using class TwentyNineteen_SVG_Icons
- How to hook into the quick edit action?
- Generate
- gform_after_submission content appears immediately after , not in post body [closed]
- How do I change parameters without changing the core
- How do you completely remove the default header and footer using functions.php?
- How to override filter in child theme?
- Is it possible to be more page/post specific with admin_enqueue_script?
- WooCommerce add_action hook results in 500 error
- Issue adding text after short description on product pages Woocommerce [closed]
- Customized wp_new_user_notification
- Customize “the_posts_pagination” and put list instead div
- change default option in wp_dropdown_categories
- What is the criteria for pluggable functions?
- Increment price for Woocommerce Minicart [closed]
- how to change link of some wordpress pages
- Gravity Forms field entries into wp_query loop [closed]
- Post thumbnail relative link and HTML modify
- Proper way of using functions in action hook?
- Generating rel=prev and rel=next only on wordpress categories
- How to preserve edits to Name or Slug of term when using wp_update_term on save?
- Accepted arguments value in hook functions
- Get current page_id before loop, in functions.php
- How to properly add function called by action-hooked function to functions.php?
- WordPress login set cookie that survive browser exit (wp_signon function)
- WordPress comment processing . Default unapproved comments detection before posting
- Warning at top of website & top menu gone
- Login cookies blocked after customizing hashing method
- Does hook have an effect on increasing the page load?
- Save_post – Warning: Cannot modify header information
- What is the earliest Hook a Script can use?
- Populate acf-field, depending on block name
- How to use WP conditional tag in a functions.php with OCEANWP Theme?
- custom error message for empty username and password using authenticate filter not working
- How Do I Unhook This Parent Theme Function?
- I have an fatal error on my funcyions.php
- Get post_author email for Zapier Integration
- Calling hooks in functions
- How to add custom column into custom post, when field is select
- How can I stop the hook from breaking the login/logout function?
- WordPress reading old version of functions.php, breaks site
- True email confirmation for registration (keeping unvalidated users from user table)
- WordPress hooks to call a function inside a construct
- WordPress undefined function error on using add_action() in functions.php
- How to echo the translated custom field?
- Providing fallback function and allow override by plugin
- Integrate WP Tiles into existing loop (index.php) and theme
- Function the_content
- Echo a div to header.php from functions.php
- Add custom fields after post/page title
- Force resize for all video content
- Unhook the comment form in Buddypress
- Why wp_ajax hooks doesn’t work?
- How can I append and prepend something to all post hyperlinks without using ::before or ::after? PHP hook solution?
- Why functions metaboxes is causing White Screen in Admin [closed]
- How do I add functionality to images?
- How to hook wp_mail to add a custom email as BCC for each sent email?
- image_size with respect to aspect ratios
- delete_term is not working properly with add_action()
- Get category of post inside save_post hook
- Create section wit form
- Log in and out using custom pages, no logout confirmation and redirects for logging in and out 2023
- Copy and Modified WooCommerce function is_coupon_valid [closed]
- How can I edit the wp_parse_auth_cookie function from the pluggable file in my functions?
- Function attached to cron job not running but will run if called manually
- How can I able to exclude ‘Category’ and ‘Tag’ slug from the URL in WordPress without reloading to new site?
- Redirecting after login except for a specific page
- Hreflang Tags from the Most Recent Post Appearing in Category Page Headers