How to publish page that can’t be detected by search engines?

How about something like this on your functions.php: add_action(‘wp_head’, ‘no_robots_on_uncategorized_posts’); function no_robots_on_uncategorized_posts() { if(in_category(‘uncategorized’)) { wp_no_robots(); } } This will output the following line of code on the header of your ‘uncategorized’ posts: <meta name=”robots” content=”noindex,nofollow” /> What this means is that even though search engines will see the page, they will be told to … Read more

Make Google index the entire post if it is separated into several pages

The basic problem for a script solution is: rel_canonical does not offer any useful filter. So we have to replace that function: remove_action( ‘wp_head’, ‘rel_canonical’ ); add_action( ‘wp_head’, ‘t5_canonical_subpages’ ); The next problem: $GLOBALS[‘numpages’] is empty before setup_postdata(). We could call that function already here, but it might have side-effects. Here is a solution that … Read more

tech