Created
September 13, 2023 10:20
-
-
Save abdulawal39/d7aa809a8e042da88cb95bba4e46c1c5 to your computer and use it in GitHub Desktop.
Disable archive page for pdfviewer post type on TNC FlipBook - PDF Viewer for WordPress Plugin
This file contains 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 the following code in your active theme's functions.php file | |
*/ | |
function tnc_pvfw_set_has_archive_false( $args, $post_type ) { | |
if ( 'pdfviewer' === $post_type ) { | |
$args['has_archive'] = false; | |
} | |
return $args; | |
} | |
add_filter( 'register_post_type_args', 'tnc_pvfw_set_has_archive_false', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment