=== DCP – Data Content Publisher ===
Contributors: dcpdev
Tags: custom database, bulk page generator, programmatic seo, csv import, content publisher
Requires at least: 6.2
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Create custom databases, import CSV data, and bulk-generate pages with templates. The data-driven content publisher.

== Description ==

Data Content Publisher (DCP) lets you manage structured data inside WordPress and turn it into real, editable posts at scale.

**How it works:**

1. Create a database — define columns (text, numbers, images, URLs), add rows manually or import from CSV.
2. Write a template — use placeholders like `[column_name]`, conditions `[if]`, and loops `[repeat]` to design how each entry looks.
3. Publish — bulk-generate real WordPress posts from your data, or drop a shortcode on any existing page to display data inline.

Every generated post is a normal WordPress post. You can edit it individually, hand it to a writer, or leave it as-is. Titles and data fields are filled in automatically. Internal links between generated pages are built into your template — no extra plugin needed.

**Key Features:**

* Custom databases with dedicated MySQL tables (not wp_postmeta)
* Template engine with conditionals, loops, nested templates, and calculations
* Bulk WordPress post generation — real posts, not virtual pages
* CSV import and export (works with Google Sheets / Excel)
* Shortcode-driven display with advanced filtering (greater than, less than, like, in, not in)
* Update data once — every page that references it changes instantly
* Works with any theme, editor, or builder that supports WordPress shortcodes
* AI-ready documentation included — feed it to ChatGPT or Claude for template writing support

**Use Cases:**

* Programmatic SEO — generate hundreds of location or product pages from a spreadsheet
* Directory and listing sites — businesses, services, providers
* Comparison and affiliate sites — product databases, pricing tables
* Any structured content where you manage data separately from page layout

**Features:**

* One custom database with unlimited entries
* Template engine with conditions, loops, and nesting
* Article generation from database entries
* Table builder with pagination and sorting
* CSV import and export
* Sort presets and filter configuration
* AI-ready documentation

The free version includes one full-featured database. Upgrade to DCP Pro for unlimited independent databases, or DCP Advanced for cross-database relations.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`
2. Activate through the 'Plugins' menu in WordPress
3. Go to "DCP" in the admin menu to create your first database

== Frequently Asked Questions ==

= What is DCP? =
DCP (Data Content Publisher) is a custom database plugin that lets you create structured databases, design templates, and bulk-generate pages from your data — all without writing code.

= Do I need a page builder like Elementor or Gutenberg blocks? =
No. DCP uses its own template editor and outputs content via shortcodes. It works with any theme and any editor that supports WordPress shortcodes.

= Can I import data from CSV or Google Sheets? =
Yes. Export from Google Sheets or Excel as CSV, then import directly into DCP. The import handles BOM, column mapping, and duplicate detection automatically.

= How do I generate bulk pages from my database? =
Create a template, bind it to your database, then click "Generate Articles." DCP creates real WordPress posts — one per entry — that are individually editable and indexable by search engines.

= Does DCP support programmatic SEO? =
Yes. DCP is designed for programmatic SEO workflows. Import structured data via CSV, design templates with conditionals and loops, then bulk-generate hundreds of optimized pages in one click.

= What kind of posts does it generate? =
Real WordPress posts. They appear in your post list, support revisions, and work with SEO plugins. Each one is individually editable — unlike virtual page generators.

= Does it work without other plugins? =
Yes. DCP is a single, self-contained plugin. You do not need a separate custom fields plugin, import plugin, or page builder to use it.

= Can I display database content without generating posts? =
Yes. Use `[dcpub_template]` to display template output, or `[dcpub_lookup]` to insert one field value inline.

= Can I upgrade to get more features? =
Yes. DCP Pro adds unlimited independent databases for multiple content projects on one WordPress site. DCP Advanced adds cross-database relations. All your existing data carries over seamlessly.

= What happens to my data if I deactivate or uninstall? =
Your data is stored in dedicated MySQL tables and is never deleted when you deactivate. You retain full access to existing data when you reactivate.

= What are Relations? =
Relations connect entries across different databases (e.g., Products to Categories, Articles to Authors). This feature is available in DCP Advanced.

= Is there a free version? =
Yes. This plugin is the free version. It includes one full-featured database with unlimited entries, templates, article generation, table builder, and CSV import/export.

= Does this plugin connect to external services? =
This plugin uses [Freemius](https://freemius.com/) SDK for optional usage tracking and license management. On activation, users are presented with an opt-in screen. If you choose to skip, **no data is sent** — the plugin works fully offline. If you opt in, non-sensitive diagnostic data (PHP version, WordPress version, site URL) is sent to Freemius servers to help improve the plugin.

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

== Screenshots ==

1. Database management — create tables with custom columns
2. Entry editor — add rows manually or import from CSV
3. Template builder — design output with placeholders and conditions
4. Frontend output — shortcode renders data on any page
5. Bulk post generation — one click to create posts from your data

== Changelog ==

= 1.0.4 =
* Minor admin workflow fixes and release preparation updates.

= 1.0.3 =
* Fixed an outdated upgrade link in the article generation screen.

= 1.0.2 =
* Initial release
