• Just an idea I had. Say I have selected ” Discourage search engines from indexing this site” in my Reading Settings, can you access that as a variable? My idea is to not input google analytics so a testing version of a template is not padding analytics. I already added an IP filter in google analytics, I was just thinking this would be neat.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’m not sure if that option can be edited.

    It actually adds the following to the pages:

    <meta name='robots' content='noindex,nofollow' />

    Thread Starter ryHollingsworth

    (@ryhollingsworth)

    Yeah and that’s what I’ve also used.. I was curious if I could extend this and go a step further. say

    if ( !wp_noindex() ):
         include_once("analytics.php");
    endif;

    where wp_noindex() is assuming a function which checks the boolean value of that check box…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘When using NoIndex in settings also hide analytics?’ is closed to new replies.