Created
September 22, 2023 10:33
-
-
Save apsolut/b504ac95f701db4a29640a1591c832ce to your computer and use it in GitHub Desktop.
remove global front base of archive for your Custom Post Types
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_filter( 'register_post_type_args', function( $args, $post_type ) | |
{ | |
if( ('industries' === $post_type || 'success-stories' === $post_type || 'integrations-product' === $post_type ) && is_array( $args ) ) { | |
$args['rewrite']['with_front'] = false; | |
} | |
return $args; | |
}, 99, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment