hi, I’ve a site that does event management and I’ve created a new post type for logging emails that have been sent to people. I’ve found that these posts, while having no post content only meta data etc. are being indexed by the googles.
I’ve now tweaked my code to set these types of post to draft, which takes away the URLs but are there other steps I’m better off doing to modify the base post type itself to make things like that moot? Just make them totally invisible to anything other than logged in users?
say logged in users rather than admins here though… if I make them private posts (again manually) then they don’t appear in my get\_posts searches for the admin console I have. Maybe there’s a simple tweak for that I’ve not seen yet – I’ve not paid much attention to the author IDs in these metadata posts, maybe that’s significant?
Last part here, i’m (obviously) running register\_post\_type – in the theme’s functions.php – and it’s set to “public: true” in my code. This code would be safe to trivially change here for immediate results right? This isn’t something that’ll affect the data of the posts themselves or such?
[ad_2]
should probably set public to false if it’s only for internal use, set show_ui to true so you can see it, and set rewrite to false so it doesn’t get a URL.