=== Lithium Pages ===
Contributors: lithiummarketing
Tags: dynamic pages, shortcodes, page generator, bulk content
Requires at least: 5.0
Tested up to: 6.4
Stable tag: 1.0.0
Requires PHP: 7.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A powerful WordPress plugin for generating dynamic pages and posts from templates and shortcode variables, designed for scalable content creation.

== Description ==

Lithium Pages is a comprehensive WordPress plugin developed by [Lithium Marketing](https://lithiumseo.com) that revolutionizes how you create content at scale. It allows you to define variable shortcodes (e.g., `[city]`, `[state]`) and generate many dynamic pages/posts by replacing these variables systematically throughout titles, meta descriptions, and page content.

Perfect for agencies, SEO professionals, and content marketers who need to create location-based pages, product variations, or any content that follows a consistent template with variable elements.

= Key Features =

* **Shortcode Variable Manager**: Create and manage shortcodes through an intuitive admin interface with full data control.
* **CSV Import/Export**: Easily import shortcode values from CSV files or export them for backup and editing.
* **Dynamic Shortcode Replacement**: Replace placeholders `[shortcode]` inside post/page content, titles, and meta descriptions at render time.
* **Template and Page Generator**: Create reusable templates with placeholders and bulk generate pages/posts with a single click.
* **Data Relationship Maintenance**: Values are locked to their associated row index to maintain data integrity across all generated content.
* **Meta Fields Management**: Control SEO meta titles and descriptions with the same variable replacement system.
* **Scheduling/Publishing**: Schedule the publication of generated pages over time to avoid flooding your site with content all at once.
* **SEO Plugin Integration**: Works seamlessly with popular SEO plugins like Yoast SEO, Rank Math, and All in One SEO.
* **Spintax Support**: Create content variations using spintax format `{option1|option2}` in your templates for even more unique content.
* **Preview System**: Preview generated content before publishing to ensure quality and accuracy.

= Use Cases =

* **Local SEO**: Create location-based pages for businesses serving multiple cities or regions
* **E-commerce**: Generate product pages with varying specifications, features, or target audiences
* **Real Estate**: Build property listings that vary by neighborhood, property type, or features
* **Marketing**: Create landing pages for different audience segments, campaigns, or offers
* **Content Marketing**: Scale content production while maintaining uniqueness and relevance
* **A/B Testing**: Create content variations to test different approaches and messaging

== Installation ==

1. Upload the `lithium-pages` folder to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPress
3. Go to 'Lithium Pages' > 'Shortcode Manager' to create and manage your shortcodes
4. Import CSV data or manually add values for your shortcodes
5. Navigate to 'Lithium Pages' > 'Page Generator' to create templates with your shortcodes
6. Generate pages based on your templates and shortcode values
7. Optionally configure scheduling for gradual page publication

= Minimum Requirements =

* WordPress 5.0 or higher
* PHP 7.4 or higher
* MySQL 5.6 or higher

= Recommended Setup =

For optimal performance when generating large numbers of pages:

* Increase PHP memory limit to at least 256MB
* Set max_execution_time to at least 300 seconds
* Use a caching plugin to improve performance of generated pages

== Frequently Asked Questions ==

= How do I create a new shortcode? =

Go to 'Lithium Pages' > 'Shortcode Manager', enter a shortcode name (lowercase, no spaces), add an optional description, and click 'Add Shortcode'. Shortcode names should be alphanumeric with underscores only if needed.

= Can I import data from a CSV file? =

Yes! Go to 'Lithium Pages' > 'Shortcode Manager' > 'Import CSV' tab. Upload a CSV file with shortcode names in the header row and values in the subsequent rows. The plugin will validate your CSV to ensure proper formatting.

= How do I create a template for generating pages? =

Navigate to 'Lithium Pages' > 'Page Generator' > 'Templates' tab. Enter a template name, select the post type, and create your content using shortcodes like `[city]` or `[state]` where you want variable content to appear. You can also add shortcodes to the title and meta fields.

= How do I generate pages from my template? =

Go to 'Lithium Pages' > 'Page Generator' > 'Generate Pages' tab. Select your template, choose how many pages to generate, set the post status, and click 'Generate Pages'. You'll see a confirmation dialog before pages are created.

= Can I schedule pages to be published gradually? =

Yes! In the 'Scheduling' tab of the Page Generator, you can create a publishing schedule. Set a start date, end date, and how many posts to publish per day. The plugin will handle the rest automatically.

= How do I use shortcodes in my content? =

Simply insert the shortcode in square brackets, e.g., `[city]`, in your page or post content, title, or meta description. When the page is viewed, the shortcode will be replaced with the corresponding value.

= Will this work with my SEO plugin? =

Yes, Lithium Pages is compatible with popular SEO plugins like Yoast SEO, Rank Math, and All in One SEO. The plugin replaces shortcodes in meta titles and descriptions at render time.

= What is spintax and how do I use it? =

Spintax is a syntax that allows you to create content variations by randomly selecting from multiple options. Use the format `{option1|option2|option3}` in your templates. For example, `{Hello|Hi|Hey} there!` will randomly output "Hello there!", "Hi there!", or "Hey there!". You can enable spintax in the Settings tab of the Page Generator.

= Can I nest spintax for more complex variations? =

Yes! Lithium Pages supports nested spintax. For example: `{Hello|Hi|Hey} {there|everyone|{ladies|gentlemen}}!` This creates many possible variations by combining the different options.

= How can I preview content before publishing? =

In the 'Preview' tab of the Page Generator, you can select a template and row index to preview how the generated content will look. This helps ensure your templates and shortcodes are working as expected.

= How do I identify pages generated by Lithium Pages? =

All pages generated by the plugin are labeled with "Generated by Lithium Pages" in the WordPress admin. You can also filter the pages/posts list to show only generated content.

= Can I use this with custom post types? =

Yes! Lithium Pages works with any public post type, including custom post types created by other plugins or themes.

= Is there a limit to how many pages I can generate? =

There's no hard limit, but we recommend generating pages in batches of 50-100 to avoid server timeouts. For very large sets, use the scheduling feature to spread out the generation process.

== Screenshots ==

1. Shortcode Manager interface - Create and manage your variable shortcodes
2. CSV import screen - Easily import data from CSV files
3. Page Generator template editor - Create templates with shortcodes and spintax
4. Generate Pages interface - Bulk generate content with a few clicks
5. Scheduling interface - Set up gradual publishing schedules
6. Preview system - See how your generated content will look before publishing
7. Settings page - Configure plugin options including spintax support
8. Example of shortcode usage in content - See how shortcodes are replaced with values

== Changelog ==

= 1.2.0 =
* Added comprehensive help documentation in admin interface
* Improved integration with major SEO plugins
* Enhanced security measures throughout the plugin
* Added compatibility checks for WordPress 6.4
* Fixed issue with spintax processing in meta descriptions
* Optimized database queries for better performance
* Added new examples and templates for common use cases

= 1.1.0 =
* Added spintax support for content variations using {option1|option2} format
* Added settings tab for configuring plugin options
* Improved preview functionality with live rendering
* Enhanced CSV import validation
* Added export functionality for shortcode values
* Fixed pagination issues in the shortcode manager
* Improved error handling and user feedback

= 1.0.0 =
* Initial release
* Shortcode Variable Manager
* CSV Import/Export
* Dynamic Shortcode Replacement
* Template and Page Generator
* Meta Fields Management
* Basic Scheduling

== Upgrade Notice ==

= 1.2.0 =
This update adds comprehensive documentation, improves SEO plugin integration, enhances security, and fixes several bugs. Recommended for all users.

= 1.1.0 =
Added spintax support for creating content variations, improved preview functionality, and enhanced CSV handling. Update to get access to these powerful new features!

= 1.0.0 =
Initial release of Lithium Pages plugin.