Title: code in side bar
Last modified: August 19, 2016

---

# code in side bar

 *  [slate62](https://wordpress.org/support/users/slate62/)
 * (@slate62)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/code-in-side-bar/)
 * I put this code in my side bar does not work can someone help
 * <?php
    $IP = GETENV(“Remote_Addr”); Print(“This is your IP – ( $IP ).”); ?>

Viewing 12 replies - 1 through 12 (of 12 total)

 *  [Michael Torbert](https://wordpress.org/support/users/hallsofmontezuma/)
 * (@hallsofmontezuma)
 * WordPress Virtuoso
 * [18 years, 3 months ago](https://wordpress.org/support/topic/code-in-side-bar/#post-704099)
 * For starters, REMOTE_ADDR isn’t automatically defined.
 * Use $_SERVER[“REMOTE_ADDR”] instead.
 * _<?php
    $IP = $\_SERVER[“REMOTE\_ADDR”]; echo “This is your IP” . $IP; ?>
 *  Thread Starter [slate62](https://wordpress.org/support/users/slate62/)
 * (@slate62)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/code-in-side-bar/#post-704164)
 * Thanks for your help, but that doesn’t work either.
 * I new at PHP so any help appreciated.
 * Thanks
 *  [Michael Torbert](https://wordpress.org/support/users/hallsofmontezuma/)
 * (@hallsofmontezuma)
 * WordPress Virtuoso
 * [18 years, 3 months ago](https://wordpress.org/support/topic/code-in-side-bar/#post-704172)
 * That code does work, as I’ve used it many times.
 * Rather than just saying that it doesn’t work, give specifics. What does it display
   on the screen? What value does $IP give? Have you tried running it from the command
   line? Have you tried making a file with nothing but this code and seeing what
   happens? What server do you have, Apache? If so, What version? PHP version? etc
 *  Thread Starter [slate62](https://wordpress.org/support/users/slate62/)
 * (@slate62)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/code-in-side-bar/#post-704177)
 * I’m using Apache, and php 5.2.5, it work in a file by it’s self but does not 
   work in WP side bar displays nothing.
 * So the code works just not in WP side bar.
 *  Thread Starter [slate62](https://wordpress.org/support/users/slate62/)
 * (@slate62)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/code-in-side-bar/#post-704178)
 * can you test it in a side bar in WP let me know how it works for you.
 * Thanks
 *  [Michael Torbert](https://wordpress.org/support/users/hallsofmontezuma/)
 * (@hallsofmontezuma)
 * WordPress Virtuoso
 * [18 years, 3 months ago](https://wordpress.org/support/topic/code-in-side-bar/#post-704179)
 * Are you using widgets?
 *  Thread Starter [slate62](https://wordpress.org/support/users/slate62/)
 * (@slate62)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/code-in-side-bar/#post-704189)
 * YES
 *  Thread Starter [slate62](https://wordpress.org/support/users/slate62/)
 * (@slate62)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/code-in-side-bar/#post-704190)
 * See my site @ [](http://thewayweblog.com)
 *  Thread Starter [slate62](https://wordpress.org/support/users/slate62/)
 * (@slate62)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/code-in-side-bar/#post-704191)
 * thewayweblog.com
 *  [Michael Torbert](https://wordpress.org/support/users/hallsofmontezuma/)
 * (@hallsofmontezuma)
 * WordPress Virtuoso
 * [18 years, 3 months ago](https://wordpress.org/support/topic/code-in-side-bar/#post-704193)
 * The code in sidebar.php doesn’t show up if you’re using widgets. It’s the default
   non-widget content.
 * Either stop clear out the widgets in presentation->widgets or else drag up a 
   text widget and copy/paste the code.
 *  [Michael Torbert](https://wordpress.org/support/users/hallsofmontezuma/)
 * (@hallsofmontezuma)
 * WordPress Virtuoso
 * [18 years, 3 months ago](https://wordpress.org/support/topic/code-in-side-bar/#post-704194)
 * And don’t yell (type in all caps). We have no way of knowing from a web browser
   if you’re using sidebar.php or if you’re using the widgets manager in the admin
   interface.
 *  Thread Starter [slate62](https://wordpress.org/support/users/slate62/)
 * (@slate62)
 * [18 years, 3 months ago](https://wordpress.org/support/topic/code-in-side-bar/#post-704195)
 * [Unnecessary rudeness moderated]

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘code in side bar’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 12 replies
 * 2 participants
 * Last reply from: [slate62](https://wordpress.org/support/users/slate62/)
 * Last activity: [18 years, 3 months ago](https://wordpress.org/support/topic/code-in-side-bar/#post-704195)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
