From e8fbafc8f23db1443c382f19fb1a582a024cf76d Mon Sep 17 00:00:00 2001 From: Teemu Suoranta Date: Wed, 19 Jan 2022 14:57:55 +0200 Subject: [PATCH] fix: force new slug when title is copied from hero block --- modules/hero/setup.php | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/hero/setup.php b/modules/hero/setup.php index 37c3d4c..66478e1 100644 --- a/modules/hero/setup.php +++ b/modules/hero/setup.php @@ -139,6 +139,7 @@ function x_get_post_types_with_hero() { wp_update_post([ 'ID' => $post_id, 'post_title' => $block_title, + 'post_name' => '', // force new slug ]); } // copy post title to block title if it is not set