=== Entity Schema ===
Contributors: scottgutelius
Tags: schema, structured data, local seo, faq, seo
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 2.5.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

LocalBusiness schema with multi-type support (up to 4 @type values), 135+ business types, and FAQ schema. Clean JSON-LD, no dependencies.

== Description ==

**Professional schema markup made simple.**

Entity Schema gives WordPress sites multi-type LocalBusiness schema (up to 4 @type values across 135+ business types) and FAQ markup. No external API dependencies, no tracking, and a clean interface that outputs valid JSON-LD structured data.

= Why Entity Schema? =

* **Full-Featured Core** - LocalBusiness schema, FAQ schema with drag-and-drop reordering, and conflict management all included in the free version
* **Flexible Template** - Universal template supports 135+ business types with all the fields you need
* **Zero Coding Required** - Clean admin interface that anyone can use, no JSON or code editing needed
* **SEO Plugin Friendly** - Built-in conflict management works seamlessly with Yoast, Rank Math, and All in One SEO
* **Translation Ready** - Fully internationalized with proper i18n support for global audiences

= Features =

**Organization & LocalBusiness Schema**
✓ Single location with full address details
✓ 135+ business types supported
✓ Multi-type support — combine up to four business types in a single @type array
✓ Operating hours configuration
✓ Service areas (City, State, Country, or AdministrativeArea)
✓ Social media profiles integration
✓ Logo and image support
✓ Contact information and phone numbers

**FAQ Schema**
✓ Unlimited FAQs per page/post
✓ Drag-and-drop reordering
✓ Three display styles: list (default), accordion, and minimal
✓ List default aligns with Google's snippet visibility guidance
✓ Automatic theme color matching
✓ Custom color overrides via shortcode
✓ Clean, accessible markup

**Technical Features**
✓ Conflict management for SEO plugins
✓ Clean JSON-LD output
✓ No external API calls
✓ Translation ready (i18n)
✓ WordPress coding standards compliant
✓ GPL licensed

= Perfect For =

* **Local Businesses** - Restaurants, salons, contractors, retail stores — including businesses that span multiple types
* **Professional Services** - Lawyers, accountants, consultants, agencies
* **WordPress Agencies** - Provide schema for clients without subscription fees

= Technical Highlights =

* **Clean Architecture** - Base template system with specialized extensions
* **Automatic Template Routing** - Switches templates based on business type selection
* **No Database Bloat** - Uses standard WordPress storage efficiently
* **Proper Escaping** - All output sanitized and escaped per WordPress standards
* **PHPDoc Coverage** - Fully documented code for developers
* **Hooks & Filters** - Extensible for custom development

== Installation ==

= Automatic Installation =

1. Log into your WordPress admin dashboard
2. Go to **Plugins → Add New**
3. Search for "Entity Schema"
4. Click **Install Now** on the Entity Schema plugin
5. Click **Activate** after installation completes
6. Go to **Entity Schema** in your admin sidebar to configure

= Manual Installation =

1. Download the plugin ZIP file
2. Log into your WordPress admin dashboard
3. Go to **Plugins → Add New → Upload Plugin**
4. Click **Choose File** and select the ZIP file
5. Click **Install Now**
6. Click **Activate Plugin** after installation completes

= After Activation =

1. Click **Entity Schema** in your WordPress admin sidebar
2. The Universal Template will load automatically
3. Select your business type from the dropdown (135+ options)
4. Fill in your business information (name, address, phone, etc.)
5. Click **Save All Changes**

Your organization schema is now live on your homepage!

To add FAQ schema:
1. Edit any page or post
2. Scroll to the **FAQ Schema** metabox
3. Add your questions and answers
4. Add the `[entisc_faq]` shortcode where you want FAQs to display
5. Publish or update the page

== Frequently Asked Questions ==

= What does Entity Schema do that's different from general SEO plugins? =

Entity Schema specializes in **business schema** - organization, locations, and FAQs with dedicated fields and features.

**Key Features:**

* **Complete LocalBusiness schema** - Full address, hours, service areas, and contact fields
* **Drag-and-drop FAQ reordering** - Rearrange questions without deleting/recreating
* **Conflict management** - Works alongside other SEO plugins without duplicate schema
* **Clean, focused functionality** - Dedicated to business schema with no bloat

= Will this conflict with my SEO plugin? =

No! Entity Schema includes automatic conflict management. It detects Yoast, Rank Math, and All in One SEO, then prevents duplicate organization/business schema.

**How it works:**
1. Your SEO plugin handles: Articles, HowTo, Videos, (content schema)
2. Entity Schema handles: Organization, LocalBusiness, FAQs (business schema)
3. Both plugins work together without conflicts

Enable conflict management in **Entity Schema → Conflicts** settings. It's that simple.

= Do I need coding knowledge to use this? =

Not at all. Entity Schema was built for non-technical users. The admin interface uses simple forms - just fill in your business information like you would on any website.

No JSON editing. No code snippets. No complicated settings. If you can fill out a contact form, you can use Entity Schema.

= Will this improve my SEO? =

Schema markup helps search engines and AI systems understand your business accurately. It won't make weak content rank higher, but it makes your business facts machine-readable, which means search engines don't have to guess what you do, where you operate, or what you offer.

Two things get conflated here. Structured data (schema markup) makes your business facts explicit. Structured content (clear headings, direct answers, useful information) is what earns visibility in search results and AI-generated answers. Schema handles the first half; your content handles the second. Entity Schema gives you the tools for both.

= Does it work with page builders? =

Yes! Entity Schema works with all page builders including:

* Gutenberg (WordPress block editor)
* Elementor
* Divi
* Beaver Builder
* WPBakery
* Oxygen
* Bricks

The FAQ shortcode `[entisc_faq]` works anywhere you can add shortcodes. The schema itself is added to the page HTML, so it works regardless of your page builder.

= What business types are supported? =

Entity Schema supports 135+ business types organized into categories:

**Professional Services:** Attorney, AccountingService, RealEstateAgent, InsuranceAgency, Notary, etc.

**Retail & Sales:** Store, ClothingStore, HardwareStore, FurnitureStore, JewelryStore, etc.

**Automotive:** AutoDealer, AutoRepair, AutoBodyShop, GasStation, MotorcycleDealer, etc.

**Food Service:** Restaurant, CafeOrCoffeeShop, Bakery, FastFoodRestaurant, BarOrPub, Distillery, etc.

**Home Services:** Electrician, Plumber, RoofingContractor, HVACBusiness, Locksmith, etc.

**Lodging:** Hotel, Motel, BedAndBreakfast, Resort, Campground, VacationRental, etc.

**Health & Beauty:** BeautySalon, HairSalon, DaySpa, TattooParlor, Dentist, VeterinaryCare, etc.

**Entertainment:** MovieTheater, AmusementPark, ComedyClub, Museum, ArtGallery, etc.

Don't see your exact type? Use the Universal template with LocalBusiness - it works for all business types!

= How do I display FAQs on my pages? =

After adding FAQs in the FAQ Schema metabox, add this shortcode to your page content:

`[entisc_faq]`

**Display style options:**
* `[entisc_faq]` - Default list style (recommended for SEO and snippet visibility)
* `[entisc_faq style="accordion"]` - Accordion with expand/collapse
* `[entisc_faq style="minimal"]` - Minimal styling

**Color options:**
* `[entisc_faq accent_color="#0073aa"]` - Custom accent color
* `[entisc_faq bg_color="#f9f9f9"]` - Custom background color
* `[entisc_faq text_color="#333333"]` - Custom text color

Colors automatically match your WordPress theme by default!

= Can I reorder FAQs without deleting them? =

Yes! In the FAQ metabox, simply drag the **⋮⋮** handle to rearrange questions. Your content is preserved - no deleting and recreating FAQs just to change the order.

= Can I add links inside FAQ answers? =

Yes. Entity Schema preserves any links you add inside your FAQ answers. They appear exactly as you wrote them, both in the visible display on your page and in the FAQPage structured data. Google's FAQ spec explicitly allows anchor tags in answer text, so there's nothing to worry about on the markup side. Some FAQ plugins strip links from the structured data output even when they display them on the page. Entity Schema keeps them intact in both places. For more on how to get the most out of FAQ schema, visit https://entityschema.com/faq/


= Is it translation ready / multilingual compatible? =

Yes! Entity Schema is fully internationalized with proper i18n support. All user-facing strings are wrapped in translation functions with the `entity-schema` text domain.

Works with:
* WPML
* Polylang
* TranslatePress
* Weglot
* Any translation plugin

= Does it store data externally or make API calls? =

Entity Schema stores all of your schema data (business info, FAQs, settings) in your WordPress database. Your schema data stays on your server and is never sent anywhere.

The plugin bundles the Freemius SDK to manage optional opt-in usage tracking and deactivation feedback. See the "Third-Party Services" section below for details.

= Third-Party Services =

Entity Schema uses the **Freemius SDK** ([freemius.com](https://freemius.com)) for plugin activation, optional anonymous usage tracking (opt-in only), and deactivation feedback. The SDK is bundled with this plugin.

**What data is sent and when:**

* **On activation:** The Freemius SDK shows an opt-in dialog asking if you want to share anonymous usage diagnostics. Nothing is sent unless you click "Allow & Continue." If you skip or decline, no data is sent.
* **If you opt in:** Freemius periodically sends anonymous diagnostics (WordPress version, PHP version, active theme, plugin version, site URL) to help improve the plugin.
* **On deactivation:** An optional feedback form is shown. Submitting feedback sends your response to Freemius; skipping sends nothing.

**Terms and privacy:**

* Freemius Terms of Service: [https://freemius.com/terms/](https://freemius.com/terms/)
* Freemius Privacy Policy: [https://freemius.com/privacy/](https://freemius.com/privacy/)

The plugin functions completely without opting in. You can skip the opt-in dialog and use all features normally.


= How do I verify my schema is working? =

Two easy ways:

**Method 1: View Source**
1. Visit your homepage
2. Right-click → View Page Source
3. Search for "schema.org"
4. You'll see your schema in clean JSON-LD format

**Method 2: Google Rich Results Test**
1. Copy your page URL
2. Visit: https://search.google.com/test/rich-results
3. Paste your URL and click "Test URL"
4. Google shows exactly what schema it found

Green checkmarks = success!

**Built-In Links:** Entity Schema includes direct links to both the Google Rich Results Test and Schema.org's validator right from the plugin settings, so you can verify your markup from your WordPress dashboard.

== Screenshots ==

1. Business type selector - 135+ categorized business types with proper schema.org mapping
2. FAQ Schema editor - drag-and-drop reordering with full HTML link support in answers
3. Location fields - address, contact, and geo coordinates with auto-split paste from Google Maps
4. Service/Product Offerings - define services and products with proper schema types
5. Conflict Management - automatic detection and filtering alongside your existing SEO plugin
6. Schema output in page source - clean JSON-LD markup without bloat

== Changelog ==

= 2.5.0 - 2026-07-13 =

* Added: Education types (Preschool, School, CollegeOrUniversity, etc.) can now be combined with additional business types — e.g. a preschool that is also a childcare facility (`"@type": ["Preschool", "ChildCare"]`) or a college-affiliated prep school (`["CollegeOrUniversity", "HighSchool"]`). Education types also now appear in the Additional Business Types selector.
* Added: LocalBusiness is now automatically included as a second @type for deep schema.org subtypes (e.g. `"@type": ["VeterinaryCare", "LocalBusiness"]`). This clears schema.org validator warnings about properties like geo and openingHoursSpecification on those types; Google's Rich Results Test is unaffected. Nothing changes in your settings — it's output-only and doesn't count against the 4-type limit.
* Changed: The JSON-LD output now includes only the fields you've actually configured. Empty values and plugin defaults (like `currenciesAccepted: "USD"` and `addressCountry: "US"` when you never set a country) no longer appear in the markup. A one-time cleanup removes previously stored defaults — a country saved next to a filled state/ZIP is kept.
* Fixed: An incomplete location row (e.g. city but no street address) no longer causes the business type, service areas, and services to disappear from the output. They now stay on the organization entity until the address is complete.
* Fixed: Healthcare template — service areas no longer disappear when no clinic location has a name; they appear on the organization entity instead.

= 2.4.2 - 2026-07-05 =

* Changed: Welcome notice "Get Started" button now opens the Quickstart guide at entityschema.com (previously linked back to the settings page).
* Changed: Updated bundled Freemius SDK to 2.13.3 (currency handling improvements, configurable API timeout, PHP warning fixes).
* Removed: Leftover unused code from the old radius-based service-area system, fully replaced by typed service areas (City, State, Country, AdministrativeArea). No behavior change.

= 2.4.1 - 2026-07-05 =

* Added: FAQ Display Defaults on the Tools page — set the site-wide default FAQ display style (List, Accordion, or Minimal) and the default question heading level (H2, H3, or H4). Each page can still override these in its FAQ metabox, and shortcode attributes override both.

= 2.4.0 - 2026-07-03 =

* Added: Additional Business Types — select up to 3 extra schema.org types that also describe your business (e.g., a restaurant that's also a bar). Output uses Google's documented multi-type pattern: `"@type": ["Restaurant", "BarOrPub"]`. Single-type setups are unchanged.
* Fixed: Conflict management now suppresses Rank Math's companion `Place` location node and covers every business type Rank Math offers, and the full suppression list is applied uniformly to Yoast and All in One SEO as well.
* Fixed: Healthcare template no longer outputs `priceRange` on a MedicalOrganization-typed entity (invalid per schema.org); it still appears for Hospital, Medical Clinic, and other local-business medical types.

= 2.3.0 - 2026-06-09 =

* Fixed: Pasting `<script type="application/ld+json">`-wrapped JSON-LD into the importer no longer reports "No importable fields were found."
* Added: Import now handles multiple JSON-LD `<script>` blocks (and bare concatenated JSON objects) in a single paste.
* Added: Import maps Healthcare fields — medical specialties, pharmacy, Google Business Profile, org/per-location addresses (with `@id` reference resolution), Tax ID, founded year, and number of employees.

= 2.1.0 - 2026-04-25 =

* Added: List and Minimal FAQ display styles are now available in the free version.
* Changed: Default FAQ display style is now List (previously Accordion). Existing shortcodes with no style attribute will render as List after update. To preserve the previous behavior, add `style="accordion"` to the shortcode.
* Removed: Stray external link in plugin settings footer.
* Improved: Location data sanitization.
* Fixed: Renamed Universal template file to follow WPCS class file naming convention.
* Fixed: PHPCS empty-line errors and unused parameter warning.
* Reason for FAQ default change: Aligns with Google's April 2026 guidance recommending visible content (not accordions) for "Read More" deep-link snippet eligibility in SERPs.

= 2.0.0 - 2026-04-11 =

**Initial Release**

* Organization & LocalBusiness schema
* 150+ supported business types
* Universal Schema Builder template
* FAQ schema with metabox integration
* Drag-and-drop FAQ reordering
* Accordion FAQ display style
* Automatic theme color detection for FAQs
* Custom color overrides via shortcode attributes
* Service area support (City, State, Country, or AdministrativeArea)
* Operating hours configuration
* Social media profile integration
* Conflict management for SEO plugins (Yoast, Rank Math, All in One SEO)
* Clean JSON-LD output
* Translation ready (i18n)
* GPL licensed
* WordPress coding standards compliant
* No external API dependencies