How to Filter Internal Traffic (Your IP)

[ad_1]

Sure, you can use the caos_exclude_from_tracking filter. Something like:

add_filter('caos_exclude_from_tracking', 'daan_exclude_ip_address');

function daan_exclude_ip_address($exclude) {
    if (is_user_logged_in()) {
        return $exclude;
    }

    return isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] === 'YOUR.IP.ADDRESS';
}

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer