Created
September 26, 2024 09:04
-
-
Save abdulawal39/21b6dcd1a2abac3007593b5ad0d855dd to your computer and use it in GitHub Desktop.
Revisions
-
abdulawal39 created this gist
Sep 26, 2024 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ function tncpvfw_support_disable_pdfviewer_archive_and_hide_from_google($args, $post_type) { if ($post_type === 'pdfviewer') { $args['has_archive'] = false; } return $args; } add_filter('register_post_type_args', 'tncpvfw_support_disable_pdfviewer_archive_and_hide_from_google', 10, 2); function tncpvfw_support_add_noindex_meta_tag() { echo '<meta name="robots" content="noindex, nofollow" />'; } add_action('tnc_pvfw_head', 'tncpvfw_support_add_noindex_meta_tag');