• I’d like to check the URL for wp-admin on each page. I have a tracking script in the header of index.php. The problem is it will also track my activity in the admin, which I don’t want it to do. I can easily take care of this by just not displaying the code when wp-admin is in the URL.

    How can I check the URL of each page?

    Thanks,
    Brett

Viewing 1 replies (of 1 total)
  • Thread Starter brettr

    (@brettr)

    This seems to work good enough

    <?php
    $url= $_SERVER['PHP_SELF'];
    $isWPAdmin = strstr($url, "blog");
    if($isWPAdmin) {echo $url;}
    else {echo "hello";}
    ?>

Viewing 1 replies (of 1 total)
  • The topic ‘How to capture URL?’ is closed to new replies.