Title: Get user IP
Last modified: August 22, 2016

---

# Get user IP

 *  [sarahjadesigns](https://wordpress.org/support/users/sarahjadesigns/)
 * (@sarahjadesigns)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/get-user-ip/)
 * Since this plugin has the ability to add hidden fields, I was wondering if it
   was possible to include the IP of the visitor who is submitting the form, either
   via shortcode or JavaScript/jQuery.
 * In a hidden field, it’s possible to add the title or id of the page (by using`
   [the_title](http://codex.wordpress.org/the_title)` or `[the_id](http://codex.wordpress.org/the_id)`)
   from which the visitor submits the form, so I was hoping something similar would
   be possible for an IP.
 * Any help would be appreciated, thanks 🙂
 * [https://wordpress.org/plugins/ajax-contact/](https://wordpress.org/plugins/ajax-contact/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [sarahjadesigns](https://wordpress.org/support/users/sarahjadesigns/)
 * (@sarahjadesigns)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/get-user-ip/#post-5669996)
 * I’d like to add that I’ve been able to add a function to my theme which displays
   the visitor’s IP ([see what I used here](http://www.wpbeginner.com/wp-tutorials/how-to-display-a-users-ip-address-in-wordpress/)).
   This displays the IP when you use the shortcode `[ show_ip ]`. It works on pages
   and posts without a problem. But I can’t get it to work in the hidden field, 
   either by typing it enclosed in single `[ ]` or double `[ [ ] ]` square brackets(
   the forum is doing funny stuff with displaying stuff between square brackets,
   hope this is clear).

Viewing 1 replies (of 1 total)

The topic ‘Get user IP’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/ajax-contact.svg)
 * [AJAX Contact](https://wordpress.org/plugins/ajax-contact/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ajax-contact/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ajax-contact/)
 * [Active Topics](https://wordpress.org/support/plugin/ajax-contact/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ajax-contact/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ajax-contact/reviews/)

## Tags

 * [IP](https://wordpress.org/support/topic-tag/ip/)

 * 1 reply
 * 1 participant
 * Last reply from: [sarahjadesigns](https://wordpress.org/support/users/sarahjadesigns/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/get-user-ip/#post-5669996)
 * Status: not resolved