Support » Plugin: Show Private » Works perfectly!

  • Thanks for this plugin! It has saved me so much work. I can now ensure that certain posts are shareable via URL but do not show up in archive pages.

    To be doubly sure that these private posts did not show up in search engine results, I used a custom field that inserts robots noindex meta to the head of the page.

    function add_meta_noindex() {
    	global $post;
    	$noindex = get_post_meta($post->ID, 'noindex-post', true);
       	if ($noindex) {
            	echo "<meta name=\"robots\" content=\"noindex,nofollow,noarchive,nocache,nosnippet,noodp,noydir,noimageindex\" />\n";
        	}
    }
    add_action('wp_head', 'add_meta_noindex');
  • The topic ‘Works perfectly!’ is closed to new replies.