=== Neat Affiliate Links ===
Contributors: neatwp
Tags: affiliate, links, redirects, click-tracking, nofollow
Requires at least: 5.0
Tested up to: 6.6
Stable tag: 1.3
Requires PHP: 7.0
License: GPLv2
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Lightweight (2.4 kB) affiliate links plugin with categories, customizable slug, nofollow, 307 redirects, and click tracking.

== Description ==

Neat Affiliate Links is a lightweight (2.4 kB) WordPress plugin designed to manage affiliate links efficiently. Create, categorize, and track affiliate links with ease, featuring a customizable URL slug, nofollow headers, 307 temporary redirects, and click tracking.

= Key Features =
* **Custom Post Type**: Manage affiliate links as a custom post type in the WordPress admin.
* **Customizable Slug**: Set a custom slug for affiliate links (e.g., yoursite.com/out/link-name).
* **Categories**: Organize links with hierarchical affiliate categories (category archives disabled on frontend for better control).
* **Click Tracking**: Monitor link clicks with a click count displayed in the admin.
* **SEO-Friendly**: Applies nofollow via X-Robots-Tag header, uses 307 redirects, and excludes links from WordPress sitemap.
* **Lightweight**: Minimal code footprint for optimal performance.

= Usage =
1. Install and activate the plugin.
2. Go to **Affiliate Links** in the WordPress admin to add or manage links.
3. Set the destination URL for each link in the Affiliate Link Details meta box.
4. Optionally categorize links using Affiliate Categories.
5. Customize the link slug under **Affiliate Links > Settings** (default is 'out').
6. After changing the slug, visit **Settings > Permalinks** and click "Save Changes" to flush rewrite rules.
7. Use the generated links (e.g., yoursite.com/out/link-name) in your content.

== Installation ==

1. Upload the `neat-affiliate-links` folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the **Plugins** menu in WordPress.
3. Go to **Affiliate Links** in the admin menu to start creating links.
4. Configure the slug under **Affiliate Links > Settings** if desired.
5. Visit **Settings > Permalinks** and click "Save Changes" to ensure links work correctly.

== Frequently Asked Questions ==

= How do I change the affiliate link slug? =
Go to **Affiliate Links > Settings** in the WordPress admin, enter your desired slug (e.g., 'go' or 'link'), and save changes. Then, visit **Settings > Permalinks** and click "Save Changes" to update the rewrite rules.

= Will changing the slug affect existing links? =
Yes, changing the slug will update the URL structure for all affiliate links. Ensure you update any links used in your content and flush permalinks after changing the slug.

= Does the plugin support click tracking? =
Yes, the plugin tracks clicks for each affiliate link and displays the count in the admin interface under the Affiliate Links list.

= Are the links SEO-friendly? =
Yes, the plugin adds a noindex, nofollow X-Robots-Tag header, uses 307 temporary redirects, and excludes affiliate links from the WordPress sitemap to ensure SEO compliance.

= How do I categorize affiliate links? =
Use the **Affiliate Categories** taxonomy when editing a link, similar to how you categorize posts in WordPress. Note that category archives are disabled on the frontend.

== Changelog ==

= 1.3 =
* Disabled affiliate category archives on the frontend for better SEO control.
* Excluded affiliate links from WordPress sitemap to prevent indexing.

= 1.2 =
* Added customizable slug option in the admin settings.

= 1.1 =
* Initial release with custom post type, categories, nofollow, 307 redirects, and click tracking.

== Upgrade Notice ==

= 1.3 =
This version disables affiliate category archives on the frontend and excludes affiliate links from the WordPress sitemap for improved SEO. After updating, visit Settings > Permalinks and click "Save Changes" to flush rewrite rules.

= 1.2 =
This version adds a customizable slug feature. After updating, go to Affiliate Links > Settings to set your preferred slug, then visit Settings > Permalinks to flush rewrite rules.

== Additional Notes ==

* **Performance**: The plugin is lightweight (2.4 kB) to ensure minimal impact on site speed.
* **Compatibility**: Tested with WordPress up to version 6.6 and PHP 7.0 or higher.
