Skip to content

Instantly share code, notes, and snippets.

@jtsternberg
Created August 29, 2016 17:29
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jtsternberg/fe7efef742aa10cd43f133bfa75345a5 to your computer and use it in GitHub Desktop.
<?php
/**
* Hide the archive listing for Code Snippet CPT]
* see https://github.com/jtsternberg/Code-Snippets-CPT/blob/master/lib/Snippet_CPT_Setup.php#L36
*/
function code_snippets_cpt_make_non_public ( $args ) {
$args['public'] = false;
$args['publicly_queryable'] = false;
$args['has_archive'] = false;
return $args;
}
add_filter( 'snippet_cpt_registration_args', 'code_snippets_cpt_make_non_public' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment