Post Classifier AI
Automate WordPress content organization with AI. Features smart category assignment, default tag cleanup, and secure API management.
by Syed Muhammad Arieb · github.com/syed-arieb/wordpress-post-classifier-gemini
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/syed-arieb/wordpress-post-classifier-gemini/archive/refs/heads/main.zipPost Classifier AI for WordPress
Post Classifier AI is a professional-grade WordPress plugin that leverages the Google Gemini 2.5 Flash Lite API to automate post categorization. Built with a focus on clean architecture and performance, it removes the manual effort of tagging content while ensuring your site's taxonomy remains consistent.
🚀 Key Features
- Automated Taxonomy: Analyzes post content on publish and suggests 3 highly relevant categories.
- Smart Cleanup: Automatically removes the default "Uncategorized" tag if AI categories are found.
- Optimized Performance: Trims content before API transmission to ensure fast execution and lower latency.
- Secure Configuration: Dedicated Settings UI for API Key management using the WordPress Settings API.
- Loop Protection: Implements native WordPress hooks safely to prevent recursive save issues.
🛠️ Technical Implementation
This project was designed using Object-Oriented Programming (OOP) principles and follows WordPress Coding Standards:
- Service Layer: Uses
wp_remote_postfor secure communication with external APIs. - Taxonomy Logic: Uses
term_existsandwp_insert_termto dynamically manage categories without duplication. - Data Integrity: Implements rigorous sanitization and capability checks (
manage_options).
📦 Installation
- Download or clone this repository into your
wp-content/plugins/directory. - Activate the plugin through the 'Plugins' menu in WordPress.
- Navigate to Settings > Post Classifier AI and enter your Google Gemini API Key.
- Publish a new post and watch the AI categorize your content in real-time.
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request. This project follows the GPLv2 License.
Developed by Syed Muhammad Arieb - Engineering solutions at the intersection of AI and the Open Web.