=== IPGeolocation.io – Geo Redirects & Content Control === Contributors: ipgeolocation Tags: geolocation, geo redirect, ip redirect, conditional content Requires at least: 5.8 Tested up to: 7.0 Requires PHP: 7.4 Stable tag: 1.1.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Control redirects, access, and content visibility using IP-based geolocation. == Description == **IPGeolocation.io – Geo Redirect & Content Control** is a powerful WordPress plugin that allows you to control how visitors interact with your site based on their geographic location. The plugin uses the **ipgeolocation.io API** to determine a visitor’s country and other metadata, enabling advanced geo-based logic without slowing down your site. ### Main Features * Country-based redirects (entire site, specific pages, or URL patterns) * Optional popup confirmation before redirect * Country-level access control (allow or block) * Conditional content shortcodes * Output visitor geolocation data via shortcode * Page and query-string exclusions * Redirect bypass and reset via URL parameters * Bot detection (search engines & social crawlers excluded) * Administrator-safe (admins are never redirected) * IP response caching using WordPress transients == Installation == 1. Upload the plugin folder to `/wp-content/plugins/`. 2. Activate the plugin via **Plugins → Installed Plugins**. 3. Enter your **ipgeolocation.io API key** in the plugin settings. 4. Configure redirect rules, exclusions, or country access rules. == Configuration == The plugin supports the following API plans from ipgeolocation.io: * Developer (Free) * Paid Additional security-related features are available for paid plans only. == Shortcodes == ### Display Single Geolocation Field [ipgeo country] [ipgeo city] [ipgeo country_code] [ipgeo latitude] [ipgeo longitude] Available fields include: `ip, city, state, country, country_code, zipcode, continent, latitude, longitude, currency, calling_code, languages, is_proxy, is_tor, is_anonymous, cloud_provider` ### Conditional Content (Show If Match) [ipgeo_if country_code="US,CA" logic="OR"] Visible to visitors from the US or Canada. [/ipgeo_if] Supported attributes: * country * country_code * state * city * continent * is_proxy * is_tor * is_cloud_provider * is_anonymous * logic (AND / OR) ### Conditional Content (Hide If Match) [ipgeo_if_not country="Germany"] Hidden from visitors in Germany. [/ipgeo_if_not] == Redirect Bypass == For testing or user control, redirects can be bypassed: * `?geo_bypass=1` — bypass redirects for 30 days * `?geo_reset=1` — reset the bypass cookie == Frequently Asked Questions == = Does this plugin redirect logged-in administrators? = No. Administrators are automatically excluded. = Are bots and search engines redirected? = No. Known bots (Google, Bing, Facebook, Twitter, etc.) are excluded. = Does the plugin cache API responses? = Yes. IP data is cached for 24 hours per IP. = Does it work with Cloudflare? = Yes. The plugin supports the `CF-Connecting-IP` header. = Will this slow down my site? = No. API results are cached and redirects are handled efficiently. == External Services Used == This plugin relies on the **[ipgeolocation.io API](https://ipgeolocation.io/)** to provide its core geolocation functionality. **API Features Used:** - Determines visitor **country, city, state, continent, latitude/longitude**, and more - Detects **proxy, VPN, Tor usage**, and cloud providers - Enables **country-based redirects, content visibility rules, and access control** - Caches API responses for 24 hours per IP to reduce requests and improve performance **Important Notes:** - An **ipgeolocation.io API key is required**. You can obtain one by creating a free or paid account at [ipgeolocation.io](https://ipgeolocation.io/). - Without the API, the plugin’s core features (redirects, content rules, access control) will not function. - All API calls respect the user’s privacy and are only used for geolocation purposes. **Link to Terms of Use:** [ipgeolocation.io Terms](https://ipgeolocation.io/tos.html) == Screenshots == 1. Country redirect rules settings 2. Redirect confirmation popup 3. Country access control settings 4. Conditional content shortcodes == Changelog == = 1.1.0 = * Upgraded internal API from v2 to v3 * Simplified plan types: Developer and Paid Plan only * Standard, Advanced, and Security plans auto-migrated to Paid Plan * Rename the plugin = 1.0.0 = * Initial public release * Country redirects with popup support * Country access allow/block rules * Conditional shortcodes * Bot detection and caching == Upgrade Notice == = 1.1.0 = This update upgrades the internal API to v3. Existing plan types (Standard, Advanced, Security) will be automatically migrated to Paid Plan. No action required. = 1.0.0 = Initial release. == License == This plugin is licensed under the GPL v2 or later.