I have a plugin that uses custom post type for holding content that I pull via a shortcode elsewhere. However on a new site I noticed one of the posts in the CPT started showing up in the google search results. The post isn't linked anywhere directly. How would that show up there? How can I hide it from showing up in google?
I set public to false, now that just turns the page into the home page. I don't know that this will completely fix my problem. What else can I do?
register_post_type('mycpt', array( 'labels' => $labels, 'public' => false, 'show_ui' => true, 'menu_icon' => $icon_svg, '_builtin' => false, 'capability_type' => 'page', 'hierarchical' => true, 'rewrite' => false, 'query_var' => 'mycpt', 'exclude_from_search' => true, 'supports' => array( 'title', 'editor', 'revisions', ), 'show_in_menu' => true, ));