About this plugin
Show IP Address provides a small set of shortcodes for displaying request information. It does not store visitor information or call a third-party IP lookup API.
The default shortcode output is loaded from this site’s own WordPress REST API. This avoids putting one visitor’s IP address into HTML that may be served to other visitors by a full-page cache. If a host or security plugin blocks the REST API, the shortcode displays an unavailable message rather than a potentially incorrect cached address.
By default, the plugin uses the address seen by the web server ( REMOTE_ADDR ). If a site is behind a proxy or CDN, this may be the proxy’s address. Forwarded headers are not trusted automatically because they can be forged unless the proxy is configured to set them securely.
Hosting providers or site developers can add trusted proxy support with the show_ip_address_client_ip filter.
Shortcodes
- [show_ip] — Display the visitor’s IP address.
- [show_ip_hostname] — Display the reverse-DNS hostname when available. This performs a DNS lookup only when requested.
- [show_ip_useragent] — Display the browser user-agent string when supplied.
- [show_ip_referrer] — Display the referrer URL when supplied. Browsers and privacy settings may omit it.
All shortcodes accept mode="server" for server-rendered output, for example [show_ip mode="server"]. Use this only on pages excluded from full-page caching; otherwise a cache may show one visitor’s details to another.
Shortcodes render with the CSS class show-ip-address and a field modifier such as show-ip-address--ip. The plugin adds no global styles, so typography and colour inherit from the active theme. You can target these classes in your theme stylesheet if desired.
Compatibility
The plugin uses WordPress core APIs, PHP, and a same-site REST request. It has no third-party IP lookup API, custom database table, shell command, or host-specific server dependency. The optional hostname shortcode uses the host’s DNS resolver when requested.
The dynamic shortcode requires JavaScript and access to the site’s WordPress REST API. If that request is blocked, the plugin reports that the information is unavailable.
4 is the minimum code compatibility level. 4 is end-of-life; use a PHP version that still receives security updates from your hosting provider. 3 or newer.
Privacy
The plugin does not store the displayed visitor details. The visitor IP is returned to that same visitor by a public, read-only endpoint on the current site. Site owners remain responsible for their own privacy notices and server/CDN logging.