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
- How to influence the information displayed on widget inside wp-admin
- 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
- why doesnt is_home() work in functions.php
- Implementing DNS Prefetching with WordPress
- How can I tell if I’m on a login page? [duplicate]
- In WooCommerce I need to modify the thankyou.php page [closed]
- How can I add an extra WooCommerce hook
- 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?
- Convert hyphen to underscore in permalinks
- Remove Page Title from Static Frontpage
- 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?
- 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?
- WooCommerce add_action hook results in 500 error
- Customized wp_new_user_notification
- 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]
- Proper way of using functions in action hook?
- 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?
- Which action hook to use for function?
- Change size and crop medium_large images
- Inserting a functions output after the content
- Add function to every post?
- Don’t delete a page if it holds users
- Problem only while using require_once() within functions.php
- Passing values from a widget to a function within a plugin
- How can I get my Script to work on the Login page?
- Execute a ultimate member action when user role is updated
- Add other social networks to TwentyNineteen_SVG_Icons class in child theme?
- Replace a menu with widget or a custom template file programmatically
- Footer disappears when using the_content ( )
- Get User Login Data (date, time… )
- adding custom script to functions file
- jQuery does not work
- Override the WordPress core function wp_referer_field
- How to return hook data when multiple parameters are present?
- Hook into a function without a hook?
- What is the text that appears beside the page titles in the list of pages in the WP admin?
- How to edit the Tags within the image file URLs?
- How to target post and pages and not all post types in admin?
- Control the srcset much more (not all sizes in it each time)
- How to add_filter html template to middle of content
- Filter yoast canonical add_action priority [closed]
- Auto log in hook is requiring a page refresh
- New custom menu created. how to apply it?
- Add back in child theme what the parent theme removed with remove_action
- Writing a function to detect an event
- overwrite code snippet from parent to child theme
- WordPress wraps span tags into p tags
- Changing where my author box is printed
- Add Adsense code between job listings – wp job manager plugin
- Replace admin header logo with an image
- Why I can’t load my JavaScripts using an hook inside my functions.php file?
- How to place a div inside a function that creates a div
- Filter for replacing the WP_query object for a given category
- WordPress login set cookie that survive browser exit (wp_signon function)
- WordPress comment processing . Default unapproved comments detection before posting
- Login cookies blocked after customizing hashing method
- Does hook have an effect on increasing the page load?
- Populate acf-field, depending on block name
- How Do I Unhook This Parent Theme Function?
- 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
- How to echo the translated custom field?
- Integrate WP Tiles into existing loop (index.php) and theme
- Function the_content
- Echo a div to header.php from functions.php
- 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]
- image_size with respect to aspect ratios
- delete_term is not working properly with add_action()
- Get category of post inside save_post hook
- 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?
- 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