=== Pinery ===
Theme URI: https://best.uvonokay.com
Author: PineryPicks
Author URI: https://best.uvonokay.com
Description: A refined, elegant theme for blogs and affiliate content. Features masonry grid, lightbox product preview, one-click affiliate purchase flow, and live customizer.
Version: 1.3.0
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
Stable tag: 1.3.0
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pinery

== Description ==

Pinery is built for bloggers and affiliate marketers who want a beautiful, high-converting site with minimal friction. The Pinterest-style masonry grid showcases product images, and the unique lightbox overlay lets visitors view full-size images and jump straight to the affiliate link with one click — no need to read a full article first.

== Features ==

* **Pinterest-style masonry grid** — Images, not text, take center stage
* **Lightbox purchase flow** — Click image → fullscreen preview → "Buy on Amazon" button → affiliate link
* **Three layout modes** — Masonry, Grid, or Mixed (first post featured large)
* **Live Customizer** — Change colors, fonts, layout, and homepage content with live preview
* **Affiliate link metabox** — Set a per-post affiliate URL in the Gutenberg editor sidebar
* **Ad zones** — Insert banners between posts, below the hero, or above the footer
* **Amazon tag auto-append** — Enter your Associates tag once, it's added to every Amazon link
* **Auto alt text** — Post titles are used as image alt text for better SEO
* **rel="sponsored"** — Amazon links automatically marked for Google compliance
* **Responsive** — Adapts from desktop to mobile with configurable column counts
* **SEO ready** — Clean heading hierarchy, schema structured data (with Rank Math), fast loading
* **Translation ready** — .pot file ready for localization

== Installation ==

1. Upload the `pinery-theme` folder to `/wp-content/themes/`
2. Go to Appearance → Themes and activate Pinery
3. Go to Appearance → Customize to configure colors, fonts, and layout
4. For SEO, install Rank Math SEO plugin (free)
5. Install the Pinery Flow plugin for affiliate features, ad zones, and price overlays

== Customizer Guide ==

=== Colors ===
Five color pickers: Accent, Background, Text, Headings, and Card Background. Changes preview live.

=== Typography ===
Choose heading and body fonts from curated Google Fonts pairs. Adjust base font size from 14-20px.

=== Layout ===
* **Masonry** — Pinterest-style variable-height columns
* **Grid** — Equal-height rows, clean and structured
* **Mixed** — First post is featured large, rest in masonry

Set column counts for desktop, tablet, and mobile independently. Toggle card metadata (excerpt, date, read time) on or off.

=== Homepage ===
Toggle the hero section on/off. Customize the hero title (HTML allowed for italic/emphasis), description text, and the CTA button text and URL.

=== Affiliate Settings ===
Set the default "Buy on Amazon" button text. Choose solid or outline button style. Enter your Amazon Associates tag to auto-append it to all Amazon links.

=== Ad Zones ===
Three zones where you can paste HTML, shortcodes, or AdSense/Amazon Native Ads scripts:
* **Below Hero** — Under the homepage hero banner
* **Between Posts** — Injected every N posts in the grid
* **Above Footer** — Just above the footer

== Setting Up Affiliate Links ==

Each post can have an affiliate URL. Open any post in the editor:

1. In Gutenberg: find the "Affiliate Link" panel in the right sidebar
2. Paste your affiliate product URL
3. If you set a default Associates tag in the Customizer, it will be appended automatically

The affiliate URL must be set via the Pinery Flow plugin or the editor metabox.

== Recommended Plugins ==

* **Rank Math SEO** — Title tags, meta descriptions, schema, sitemaps (free)
* **Cloudflare** — CDN and caching for faster page loads
* **WP Statistics** — Privacy-friendly analytics

== Frequently Asked Questions ==

= Can I use this for non-Amazon affiliate links? =
Yes. The affiliate URL field accepts any URL. The button text is customizable in the Customizer.

= Does the lightbox work on mobile? =
Yes. The lightbox is fully responsive and touch-friendly.

= Can I disable the lightbox and go straight to the post? =
The post title link below each image always goes to the full article. Use that if you prefer the traditional flow.

= How do I change the number of posts per page? =
Go to Settings → Reading in your WordPress admin.

== Changelog ==

= 1.3.0 =
* Ad-zone logic moved to Pinery Flow plugin (theme now uses graceful fallback wrappers)
* Affiliate URL metabox moved to Pinery Flow plugin (ThemeForest/.org compliance)
* Price overlay moved to Pinery Flow plugin (clean theme/plugin separation)
* Removed Amazon URL scraping from pinery_get_affiliate_url() — theme only reads stored meta
* Amazon product images hotlinked instead of stored in media library (API TOS compliance)
* Fixed hero lightbox data attribute ordering (variables now resolved before rendering)
* Freemius after_optin hook wired up (was dead code)
* Client secret field no longer echoes saved value (security)
* Infinite scroll on homepage (IntersectionObserver, 10 posts per batch)
* Product gallery on single post pages (hotlinked, transient-cached)
* Added Creators API support in Pinery Flow plugin (OAuth 2.0, auto-fallback to scraping)
* version bump: 1.2.4 → 1.3.0

= 1.2.4 =
* Fixed posts_per_page -1 performance bomb → 10 + pagination
* Ad zones now allow &lt;script&gt; tags (AdSense support)
* Version numbers aligned across style.css, readme.txt, functions.php
* Auto SEO auto-disables when SEO plugin detected
* Hero lightbox data attributes moved to correct element
* Customizer null-safe for core colors section

= 1.1.0 =
* Added WordPress Customizer integration (colors, fonts, layout, homepage, affiliate)
* Added three layout modes: masonry, grid, mixed
* Added affiliate URL metabox (Gutenberg sidebar + classic editor)
* Added ad zone management system
* Added live customizer preview JS
* Added dynamic Google Fonts loading
* Added "rel=sponsored" auto-tagging for Amazon links
* Added custom 404 template with search and recent posts
* Added breadcrumb support (Rank Math)
* Added page.php, comments.php, search.php, sidebar.php templates
* Added post_class(), wp_link_pages() support
* Added Gutenberg editor styles and block support
* Generic content support beyond fashion niche
* Translation-ready with .pot file
* Moved inline JS to external lightbox.js
* Dynamic category navigation

= 1.0 =
* Initial release
