When using the Gutenberg Block editor you need to use different hooks to get the expected behavior.
rest_insert_{$this->post_type}
The pre-update hook.rest_after_insert_{$this->post_type}
The post-update hook.
credits: @SallyCJ
Related Posts:
- WordPress 4.4+ breaks Walker Extension
- Gutenberg Editor: dynamicaly change slug field with an ACF field
- How to edit the slug/permalink in Gutenberg?
- How can I get this custom post type permalink structure? %custom_post_type%-%taxonomy%-%term-postname%
- Gutenberg output URL to post from attribute with post ID
- Relative links in Gutenberg
- Add post overwriting permalink from previous post in 4.6
- Gutenberg Editor: dynamically edit slug field based on ACF field
- MySQL-inserted custom taxonomy term lead to 404, flush rewrites doesn’t help
- Generate post title and permalink from custom field and post date
- Error: “Sorry, this content could not be embedded” when using the Embed block
- UI does not show correct Slug after modified using save_post action
- where is permalink info stored in database?
- How can I reverse engineer a Permalink to Find the Page?
- Mapping Domains to Permalinks (not multisite)
- Change slug on post creation
- WordPress Permalink changes to question mark (?) in URL
- How would I create a different permalink structure for pages and posts?
- My permalinks are broken! Can I use mod_rewrite to ignore a physical file?
- Can WordPress realistically handle a site with 500 ‘pages’?
- How to prevent the default home rewrite to a static page
- Is there an action for when permalinks are rebuilt?
- How to get url of a post from admin panel
- How to get a page url by a page id?
- CPT archive 404ing when using a custom taxonomy name as a variable
- How to change “permalink” structure in “WordPress Thesis” theme?
- Performance and styles not working fine after changing permalink structure
- Maintaining two permalink structures
- Can’t change permalink url after hitting ‘ok’ and ‘update’
- Rewrite user profile URL to be human friendly
- removing index.php IIS 7.5 webconfig
- How to Remove -14 from WordPress URL (Permalink)
- Rewrite URL Parameter And Force ‘Pretty’ Permalink
- How to map a URL to a specific template?
- How to hook into permalink when publishing-saving post?
- Problem duplicated shortlinks bitly
- Incorrect 404 for pages when using permalink, a static front page, and posts page
- Is there a wordpress function that I can use to retrieve the current page that is loaded?
- Custom Permalinks don’t work on local LAMP installation
- Problems redirecting to “pretty” permalinks (wordpress in Subdirectory)
- .htaccess file missing from WordPress install directory
- Remove permalink settings in post for users
- Remove multisite “blog” slug from specific custom post type
- Redirect parent taxonomy to it’s child
- WordPress Permalinks still not working despite all necessary settings
- RewriteRule accepts numbers but not letters in tag
- Server Move: All pages leading home
- WordPress Permalink 404
- Avoid WordPress categorizing a permalink request as Not found 404 Page
- Pages not using permalink
- Include Post Format in permalink
- Redirects after permalink change
- WordPress permalink setup in Hindi
- remove product-category base but still redirect to page with same permalink
- Process all virtual sub pages on parent page
- Correct permalinks and 404-error
- What would cause a theme to add extra characters to blog post links?
- Getting 404 when Access post which name start with Digit
- Custom permalink with two parameters
- How to check if the current page is the permalink page?
- How to Link to Most Recent Custom Post of Same Term
- Custom links in menus not working in multiple environments
- 404 permalink errors on Pages only
- What happens to the permalink that use %postname% if I change the post name
- Assigning proper permalink to blog that is part of a website
- What would cause a 500 Server Error with permalinks turned OFF?
- Changing permalinks back to default ( ?p=123 )
- permalinks on title tag
- How to redirect old permalinks from https://exmaple.com/category/post_id to https://exmaple.com/category/post_id.html
- Double Slash After Media Path (uploads//)
- New posts link to old posts (random)
- Undefined variable: testimonial in D:\Projects\PWP-WP\wp-content\themes\blankslate-child\template-parts\fields\flex\bottom-page-block.php on line 123
- Is it possible to set public to false for the native WordPress blog
- Custom Permalink (with category) for Pages
- 301 redirects after changing permalinks
- Post links broken after migration
- How to change permalink for listings
- Rename Custom Post Slug using taxonomy
- Link works although page was moved to another location
- wordpress admin panel loop on nginx
- Getting current page URL when default permalink is set
- WordPress All pages but home simply read “hello”
- How to change link of an uploaded file to the media library
- On Macbook, my permalinks with post name don’t work. Returning 404 error
- WordPress pages break with custom permalink settings (theme directory not output)
- Remove /index.php from Permalink
- Difference and usage of uri (e.g. get_directory_uri) and absolute path (e.g. get_directory)
- Fresh wordpress installation in sub-directory not accessible
- Get link from wpe_excerpt “read more” and move it
- WordPress 4.0 beta – how to change the link URL in RSS feeds
- Folder Name and Category Name WordPress
- How to display post permalinks instead of pages?
- Search points to /search/?s=KEYWORD instead of /search/KEYWORD
- How to change pagination base from slash to query form?
- WP Custom Permalink Filter
- standard post with extra parameter brings permalink problem
- Remove index.php from URL
- Siteurl code for links
- Redirect Loops Problems
- Settings > Permalinks – mod_rewrite ineffective if expression not preceded by /index.php/