Hi,
I was wondering what your suggestion is to hide certain custom post types from Google. I noticed in the header after I create a custom post type there is the following code:
<meta name=”robots” content=”index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1″ />
I would like to change this code for posts with a certain custom post type.
I have tried ‘public’ => false
in the register post type function $args variable however this hides posts completely unless the person is logged in (I would assume) – I want the posts to be visible if someone types in the URL – just hidden from Google.
Any input much appreciated.
Thanks
Best,
Kosta
Hey HeadStudiosWeb,
This is not the theme function. Here is a link for you:
https://wordpress.stackexchange.com/questions/281382/hiding-custom-post-type-from-google
If you need further assistance please let us know.
Best regards,
Victoria