# Schema Star - The Ultimate WordPress SEO & Schema.org Plugin

![Schema Star](admin/assets/img/logo.png)

[![WordPress](https://img.shields.io/badge/WordPress-5.0%2B-blue.svg)](https://wordpress.org/)
[![PHP](https://img.shields.io/badge/PHP-7.4%2B-purple.svg)](https://php.net/)
[![WooCommerce](https://img.shields.io/badge/WooCommerce-2.6%2B-96588a.svg)](https://woocommerce.com/)
[![License](https://img.shields.io/badge/License-GPL%20v2-green.svg)](https://www.gnu.org/licenses/gpl-2.0.html)
[![Version](https://img.shields.io/badge/Version-10.8.100-orange.svg)](https://wpstarplugins.com)

**Schema Star** is a powerful WordPress plugin that adds comprehensive Schema.org structured data markup to your website, helping you achieve rich snippets in Google search results and improve your SEO performance.

---

## Table of Contents

- [Features](#features)
- [Requirements](#requirements)
- [Installation](#installation)
- [Configuration](#configuration)
- [Schema Types](#schema-types)
- [LMS Integrations](#lms-integrations)
- [WooCommerce Integration](#woocommerce-integration)
- [Custom Schema Builder](#custom-schema-builder)
- [FAQ Schema](#faq-schema)
- [Multi-Currency Support](#multi-currency-support)
- [Performance](#performance)
- [Security](#security)
- [Frequently Asked Questions](#frequently-asked-questions)
- [Changelog](#changelog)
- [Support](#support)
- [License](#license)

---

## Features

### Core Features
- **Product Schema** - Complete WooCommerce product markup with prices, availability, reviews, and more
- **Organization Schema** - Company information with logo, contact details, and social profiles
- **Local Business Schema** - 30+ business types with address, hours, and geo coordinates
- **FAQ Schema** - Rich FAQ snippets for posts, pages, and custom post types
- **BreadcrumbList Schema** - Navigation breadcrumbs for better site structure
- **SearchAction Schema** - Enable Google sitelinks searchbox
- **SiteNavigationElement** - Structured data for main navigation menus
- **Custom Schema Builder** - Create 20+ different schema types with visual builder

### Advanced Features
- **Multi-Currency Support** - Multiple currencies with exchange rates
- **Shipping Details** - Delivery time and shipping costs
- **Return Policy** - Merchant return policy schema
- **Auto ALT Tags** - Automatic image ALT text generation

*Demo/Free version. Product Reviews management page and ProductGroup Schema are available in the Pro version.*

### LMS Integrations (Course Schema)
- **Tutor LMS** – Course schema on single course pages; ItemList on course category and archive
- **LearnDash** – Course schema on `sfwd-courses`; ItemList on `ld_course_category` and archive
- **LearnPress** – Course schema on `lp_course`; ItemList on `course_category` and archive
- **Masteriyo** – Course schema on `mto-course`; ItemList on `course_cat` and archive  

Each LMS has a dedicated settings page (Schema Star → [LMS name]): enable Course Schema, Category & Archive Schema, Provider, and Price.

### Developer Features
- **Clean Code** - Following WordPress Coding Standards
- **Secure** - Nonce verification, sanitization, and escaping
- **Performance Optimized** - Conditional loading and caching
- **Translation Ready** - Full i18n support with .po/.mo files
- **HPOS Compatible** - WooCommerce High-Performance Order Storage ready

---

## Requirements

| Requirement | Minimum Version |
|-------------|-----------------|
| WordPress | 5.0 or higher |
| PHP | 7.4 or higher |
| WooCommerce | 2.6 or higher (optional) |

> **Note:** WooCommerce is optional. Without it, product-related features will be disabled, but all other schema features work normally.

---

## Installation

### Method 1: WordPress Admin (Recommended)

1. Download the plugin ZIP file from CodeCanyon/ThemeForest
2. Go to **Plugins → Add New → Upload Plugin** in WordPress admin
3. Choose the downloaded ZIP file and click **Install Now**
4. Click **Activate Plugin** after installation
5. Navigate to **Schema Star** in the admin menu to configure

### Method 2: FTP Upload

1. Extract the plugin ZIP file on your computer
2. Upload the `Schema-Star` folder to `/wp-content/plugins/`
3. Go to **Plugins** in WordPress admin
4. Find "Schema Star" and click **Activate**

### Method 3: WP-CLI

```bash
wp plugin install schema-star.zip --activate
```

---

## Configuration

After activation, go to **Schema Star** in your WordPress admin menu:

### Dashboard
Overview of all enabled features and quick access to settings.

### Options
Main plugin settings including:
- Enable/disable Product Schema
- Description settings (source, word limit)
- Image settings
- Currency configuration

### Organization Markup
Configure your organization details:
- Company name and logo
- Contact information (phone, email)
- Social media profiles
- Business hours
- Payment methods

### Local Business Markup
Set up local business information:
- Business type (30+ options)
- Address and contact details
- Geographic coordinates
- Opening hours
- Price range

### Product Settings
WooCommerce-specific settings:
- Return policy
- Warranty information
- Shipping time
- Product condition

### Product schema and reviews
Product schema can include AggregateRating and reviews (from WooCommerce reviews or plugin settings). Full Product Reviews management (add/edit, bulk) is available in the Pro version.

### FAQ Schema
Configure FAQ settings:
- Enable for specific post types
- Styling options
- Display settings

### Custom Schema
Create custom schemas:
- Visual schema builder
- 20+ schema types
- Target specific pages/posts

---

## Schema Types

### Product Schema (WooCommerce)

```json
{
  "@type": "Product",
  "name": "Product Name",
  "image": ["image1.jpg", "image2.jpg"],
  "description": "Product description",
  "sku": "SKU123",
  "brand": {"@type": "Brand", "name": "Brand Name"},
  "offers": {
    "@type": "Offer",
    "price": "99.99",
    "priceCurrency": "USD",
    "availability": "InStock"
  },
  "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "4.5",
    "reviewCount": "25"
  }
}
```

### Organization Schema

```json
{
  "@type": "Organization",
  "name": "Company Name",
  "url": "https://example.com",
  "logo": "https://example.com/logo.png",
  "contactPoint": {
    "@type": "ContactPoint",
    "telephone": "+1-234-567-8900",
    "contactType": "customer service"
  },
  "sameAs": [
    "https://facebook.com/company",
    "https://twitter.com/company"
  ]
}
```

### LocalBusiness Schema

Supported business types include:
- Store, Restaurant, Hotel
- MedicalBusiness, LegalService
- FinancialService, RealEstateAgent
- AutomotiveBusiness, HomeAndConstructionBusiness
- And 20+ more...

### Custom Schema Types

| Schema Type | Use Case |
|-------------|----------|
| Article | Blog posts and news |
| Book | Books and publications |
| Course | Educational content |
| Event | Events and occasions |
| JobPosting | Job listings |
| Person | Personal profiles |
| Recipe | Cooking recipes |
| Service | Service offerings |
| SoftwareApplication | Apps and software |
| VideoObject | Video content |
| HowTo | Step-by-step guides |
| Review | Reviews |
| Vehicle | Car listings |
| Podcast | Podcast episodes |
| Movie | Movies and TV shows |
| ImageLicense | Image licensing |

---

## LMS Integrations

Schema Star adds **Course** and **ItemList** schema for these LMS plugins:

| LMS | Course schema | Category / Archive schema |
|-----|----------------|---------------------------|
| **Tutor LMS** | Single course pages | `course-category` taxonomy, courses archive |
| **LearnDash** | `sfwd-courses` single | `ld_course_category`, courses archive |
| **LearnPress** | `lp_course` single | `course_category`, courses archive |
| **Masteriyo** | `mto-course` single | `course_cat`, courses archive |

**Settings:** Schema Star → [LMS name]. Enable **Course Schema** and optionally **Category & Archive Schema**. Configure Provider (name/URL) and **Show Price**. The LMS must be installed and active.

---

## WooCommerce Integration

Schema Star deeply integrates with WooCommerce:

### Automatic Data Extraction
- Product name, description, images
- Price (regular and sale)
- Stock status and quantity
- SKU and brand
- Categories and tags
- Weight and dimensions

### Review Integration
- Sync with WooCommerce reviews
- Custom review management
- AggregateRating calculation
- Individual review schema

### Advanced Product Data
- Shipping details
- Return policy
- Warranty information
- Product condition
- Sale dates

---

## Custom Schema Builder

Create custom schemas with the visual builder:

1. Go to **Schema Star → Custom Schema**
2. Click **Add New Schema**
3. Select schema type
4. Fill in the fields
5. Choose target pages/posts
6. Save and publish

### Features
- Dynamic field auto-fill from WordPress data
- Preview before publishing
- Target specific content
- Multiple schemas per page

---

## FAQ Schema

Add FAQ structured data to your content:

### Global Settings
Enable FAQ schema for specific post types in **Schema Star → FAQ Settings**.

### Per-Page FAQ
Add FAQ content when editing individual posts/pages.

### Styling Options
- Background colors
- Text colors
- Icon styles
- Gradient backgrounds
- Border radius

---

## Multi-Currency Support

Display prices in multiple currencies:

### Configuration
1. Set base currency (e.g., USD)
2. Add additional currencies with exchange rates
3. Map currencies to countries (eligibleRegion)

### Supported Currencies
- USD, EUR, GBP, SAR, AED, KWD
- And all ISO 4217 currency codes

---

## Performance

Schema Star is optimized for performance:

- **Conditional Loading** - Scripts/styles only load when needed
- **Early Returns** - Schema only generates on relevant pages
- **No Frontend Queries** - All data cached appropriately
- **Minified Assets** - CSS and JS are minified
- **HPOS Compatible** - Works with WooCommerce's new order storage

### Performance Tips
- Enable only the schema types you need
- Use caching plugins (WP Rocket, LiteSpeed Cache, etc.)
- Keep WordPress and plugins updated

---

## Security

Schema Star follows WordPress security best practices:

- **ABSPATH Check** - All files protected against direct access
- **Nonce Verification** - All forms and AJAX requests verified
- **Capability Checks** - Admin functions require proper permissions
- **Input Sanitization** - All user input sanitized
- **Output Escaping** - All output properly escaped
- **Prepared Statements** - Database queries use prepared statements

---

## Frequently Asked Questions

### Is WooCommerce required?
No, WooCommerce is optional. Without it, product features are disabled but all other schemas work normally.

### How do I verify my schema?
Use these tools:
- [Google Rich Results Test](https://search.google.com/test/rich-results)
- [Schema.org Validator](https://validator.schema.org/)
- Google Search Console Enhancements report

### Will it slow down my site?
No, Schema Star is performance-optimized. Schema is generated efficiently without additional frontend database queries.

### Is it compatible with caching plugins?
Yes, fully compatible with WP Super Cache, W3 Total Cache, WP Rocket, LiteSpeed Cache, and Cloudflare.

### Does it work with page builders?
Yes, works with Elementor, WPBakery, Divi, Beaver Builder, Oxygen, and others.

### Does it conflict with other SEO plugins?
Schema Star works alongside Yoast SEO, Rank Math, and All in One SEO. Disable overlapping schema features in other plugins to avoid duplicates.

### Is it translation-ready?
Yes, fully translation-ready with included .po/.mo files. Text domain: `schema-star`

---

## Changelog

### Version 10.8.31 (Latest)
- Improved WooCommerce HPOS compatibility
- Enhanced security with nonce verification
- Code optimization and performance improvements
- Updated documentation

### Version 10.8.30
- Added multi-currency support with exchange rates
- Added currency-to-country mapping
- Improved return policy schema
- Added new social media profiles

### Version 10.7.x
- Added Custom Schema Builder with 20+ types
- Added SiteNavigationElement schema
- Added SearchAction schema

### Version 10.6.x
- Added BreadcrumbList schema
- Added Category/Collection schema
- Improved product schema

### Version 10.5.x
- Added FAQ Schema support
- Added role-based access control
- Modern dashboard design

[View full changelog](changelog.txt)

---

## Support

### Getting Help

- **Website:** [wpstarplugins.com](https://wpstarplugins.com)
- **Plugin Page:** [Schema Star Documentation](https://wpstarplugins.com)
- **CodeCanyon:** Submit a support ticket through your purchase

### Before Contacting Support

1. Ensure you're using the latest version
2. Check WordPress and PHP requirements
3. Test with a default theme
4. Temporarily disable other plugins
5. Review the FAQ section

### Reporting Bugs

Please include:
- WordPress version
- PHP version
- Plugin version
- Steps to reproduce
- Error messages
- Screenshots if applicable

---

## License

Schema Star is licensed under the [GPL v2 or later](https://www.gnu.org/licenses/gpl-2.0.html).

```
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
```

### Envato License

When purchased from CodeCanyon/ThemeForest, additional Envato licensing terms apply. See [Envato License](https://codecanyon.net/licenses/standard) for details.

---

## Credits

- **Developer:** WP Star Plugins
- **Website:** [wpstarplugins.com](https://wpstarplugins.com)
- **Icons:** [Dashicons](https://developer.wordpress.org/resource/dashicons/)

---

**Schema Star** - Boost your SEO with powerful structured data!

*Version 10.8.31 | Copyright 2024-2026 WP Star Plugins | [wpstarplugins.com](https://wpstarplugins.com)*
