~ Display Visitors IP On your WordPress Page ~

So you Want to display your Visitors IP on Any Page of your website.

Well you have come to the right place.  Here I will outline some steps to take to Display your Visitors IP to them..

Now.. Lets Begin

All you have to do is paste the following snippet in your theme’s functions.php file or in a site-specific Plug-In.


// Display User IP in WordPress
 function get_the_user_ip() {
 if ( ! empty( $_SERVER['HTTP_CLIENT_IP'] ) ) {
 //check ip from share internet
 } elseif ( ! empty( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) {
 //to check ip is pass from proxy
 } else {
 return apply_filters( 'wpb_get_ip', $ip );
 add_shortcode('show_ip', 'get_the_user_ip');


Next thing you need to do is add the following shortcode in your post, page, or in a sidebar widget.

[‘show_ip’]^^ Remove the’