From 407544a1041b98c4827d392d35902b11eec2eda7 Mon Sep 17 00:00:00 2001 From: WordPress Special Projects <42878128+wpspecialprojects@users.noreply.github.com> Date: Thu, 22 Feb 2024 15:47:24 +0700 Subject: [PATCH] Add rewrite slug to custom post types --- plugins/osi-features/inc/classes/post-types/class-base.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/osi-features/inc/classes/post-types/class-base.php b/plugins/osi-features/inc/classes/post-types/class-base.php index 6c173e6..2e0e2ae 100644 --- a/plugins/osi-features/inc/classes/post-types/class-base.php +++ b/plugins/osi-features/inc/classes/post-types/class-base.php @@ -79,6 +79,10 @@ public function get_args() { 'has_archive' => true, 'menu_position' => 6, 'supports' => [ 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ], + 'rewrite' => array( + 'slug' => $this->get_slug(), + 'with_front' => false, + ) ]; }