=== AeroIDX ===
Contributors: realtycandy
Tags: idx, real estate, mls, seo, listings
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 8.1
Stable tag: 0.2.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

SEO-optimized real estate (IDX) listings for WordPress — clean URLs, server-side meta tags, Open Graph, and Schema.org structured data.

== Description ==

AeroIDX renders your real estate (IDX) listings as fast, fully SEO-optimized WordPress pages. Every property gets a clean, human-readable URL and complete server-side SEO markup — so search engines can crawl and index each listing the moment it goes live.

Unlike client-side IDX widgets that hide listing content behind JavaScript, AeroIDX outputs the SEO surface — title, meta description, Open Graph, Twitter Card, canonical link, and structured data — directly in the page's HTML, on the server.

**Key features**

* **Clean listing URLs** — every property is served at `/details/{address-slug}/{listing-id}`.
* **Server-side SEO** — `<title>`, meta description, Open Graph, and Twitter Card tags rendered on the server for every listing.
* **Schema.org structured data** — `RealEstateListing` JSON-LD, so listings are eligible for rich results in Google.
* **Works with your SEO plugin** — integrates with Yoast SEO and Rank Math, feeding them the listing data. With no SEO plugin active, AeroIDX outputs the tags itself.
* **XML sitemap** — a dedicated sitemap of all listings so search engines discover every property.
* **Canonical URLs and legacy redirects** — older `/details?id=...` links 301-redirect to the canonical URL, preserving SEO equity.
* **Classic and block themes** — works with both classic themes and block (FSE) themes.
* **Graceful handling of removed listings** — delisted properties return a proper HTTP 410 (Gone) page instead of a broken link.

Admin-screen icons are from the [Lucide](https://lucide.dev/) icon set, licensed under [ISC](https://github.com/lucide-icons/lucide/blob/main/LICENSE) (GPL-compatible).

== External Services ==

AeroIDX is the WordPress front end for the AeroIDX platform and requires an active AeroIDX account and API key to function. Sign up at https://aeroidx.com/plans.

The plugin communicates with the AeroIDX service (default https://app.aeroidx.com, configurable) in the following ways:

* **Listing pages (server-side):** when a listing page is requested, WordPress calls the AeroIDX API to fetch that listing's data — only the requested listing identifier is sent.
* **XML sitemap (server-side, background):** a scheduled WP-Cron job periodically fetches the full listings index from the AeroIDX API to (re)generate the sitemap.
* **API key validation & account info (server-side):** when you save your API key or open the AeroIDX admin screens, the plugin calls the API to validate the key and read your plan.
* **Page / site sync (server-side):** creating an IDX page or connecting your site sends your site's home URL to AeroIDX so it can configure deep links back to your site.
* **Widget script (browser-side):** the interactive listing widget loads its script (default https://app.aeroidx.com/components.js) from the AeroIDX asset host and requests listing data from the AeroIDX API.

Every server-side request includes your site URL (via WordPress' `home_url()`) in the HTTP `User-Agent` header so AeroIDX can associate the request with your account. These server-side requests send only the requested listing identifier (or the listings index for the sitemap) — never your visitors' personal data.

The browser-side widget is different: like any embedded third-party script (for example an embedded map or video), it loads directly from the AeroIDX asset host, so when it loads a visitor's browser exposes its IP address and User-Agent to AeroIDX. If you display the widget, disclose this in your own site's privacy policy as you would for any third-party embed.

By using this plugin you agree to the AeroIDX Terms of Service and Privacy Policy:

* Terms of Service: https://app.aeroidx.com/legal/agreements
* Privacy Policy: https://app.aeroidx.com/legal/privacy

== Privacy Policy ==

AeroIDX does not collect or store any personal data about your site's visitors on your WordPress site, and it sets no cookies.

Server-side requests this plugin makes to the AeroIDX service (https://app.aeroidx.com by default) carry only your site URL (in the `User-Agent` header) and the identifier of the listing being rendered — never visitor data.

If you display the AeroIDX widget, its script is loaded in the visitor's browser directly from the AeroIDX asset host. As with any embedded third-party script (such as an embedded map or video), the visitor's browser thereby exposes its IP address and User-Agent to AeroIDX when the widget loads. This happens only on pages where you place the widget. If you use the widget, you should disclose this in your own site's privacy policy.

Data handling by the AeroIDX service is governed by the AeroIDX Privacy Policy: https://app.aeroidx.com/legal/privacy

== Installation ==

1. Upload the `aeroidx` folder to `/wp-content/plugins/`, or install the plugin ZIP via **Plugins → Add New → Upload Plugin**.
2. Activate the plugin through the **Plugins** screen in WordPress.
3. Make sure **pretty permalinks** are enabled (**Settings → Permalinks** — any option other than "Plain"). AeroIDX needs them to serve clean listing URLs.
4. Open the **AeroIDX** menu in the WordPress admin sidebar.
5. Enter the **API Key** from your AeroIDX account and save.

Your listings will then be available at `/details/{address-slug}/{listing-id}`.

== Frequently Asked Questions ==

= Do I need an AeroIDX account? =

Yes. AeroIDX is the WordPress front end for the AeroIDX platform. You need an active account and an API key — get one at https://app.aeroidx.com/api-keys.

= Does it work with Yoast SEO or Rank Math? =

Yes. AeroIDX detects Yoast SEO and Rank Math and feeds them the listing data so they generate the meta tags. If no SEO plugin is active, AeroIDX outputs the SEO tags itself.

= Do I have to use pretty permalinks? =

Yes. AeroIDX serves listings at clean URLs, which requires the WordPress permalink setting to be anything other than "Plain".

= Does it work with block (FSE) themes? =

Yes. AeroIDX supports both classic themes and block themes — the listing widget is injected into the theme's content area in either case.

= Where do listing pages appear? =

Every listing is rendered at `/details/{address-slug}/{listing-id}` on your site. AeroIDX also generates an XML sitemap so search engines can find them all.

= What happens to a listing that is sold or removed? =

AeroIDX returns a proper HTTP 410 (Gone) page for delisted properties, so you don't accumulate broken links or soft 404s.

= How do I style listing pages to match my theme? =

AeroIDX listing pages aren't editable in the WordPress editor — they're rendered on demand from your IDX data. To style them, use the scoped CSS hooks the plugin exposes from your theme custom CSS, a page builder custom CSS field (Bricks, Elementor, etc.), or a child theme stylesheet. Your rules only affect AeroIDX pages:

* `body.aeroidx-page` — body class added on every AeroIDX-rendered page.
* `#aeroidx-listing-detail`, `.aeroidx-listing-detail` — main wrapper of the listing detail page.
* `.aeroidx-widget-mount` — direct parent of the listing-details widget element.

The same documentation, with a copy-paste example for fixing header overlap on themes with fixed or transparent headers, lives inside the plugin under **AeroIDX > Theme Integration** in the WordPress admin.

== Screenshots ==

1. A listing detail page with the interactive property widget.
2. The AeroIDX settings screen — connect your account with an API key.

== Changelog ==

= 0.2.0 =
* New: SEO-friendly agent pages at /agent/{name}/{id} — clean URLs with canonical, Open Graph, Twitter Cards, and Person schema.
* New: configurable agent URL base, with 301 redirects from previously used bases so old links keep working.
* New: agent pages integrate with Yoast SEO and Rank Math, feeding agent data through their tags so output stays single-source (no duplicate meta).
* Improved: agent pages now reach full SEO parity with listing detail pages.

= 0.1.0 =
* Initial release.

== Upgrade Notice ==

= 0.2.0 =
Adds SEO-friendly agent pages and full SEO parity for agent listings. Permalinks are flushed automatically on update.

= 0.1.0 =
Initial release of AeroIDX.
