Last active
July 28, 2017 14:14
-
-
Save bigdigital/2207d2e9d1fe41c918165752972a3505 to your computer and use it in GitHub Desktop.
The7 disable archive for post type
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
function my_custom_post_type_args( $args, $post_type ) { | |
if ( $post_type === "dt_team" ) { | |
$args['has_archive'] = false; | |
$args['rewrite'] = true; | |
} | |
return $args; | |
} | |
add_filter( 'register_post_type_args', 'my_custom_post_type_args', PHP_INT_MAX, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment