A comprehensive custom WordPress plugin designed for custom codes, functions, styles, scripts, and advanced REST API integrations. Built by BooSpot.com for enhanced website functionality and SEO optimization.
- Custom CSS & JavaScript - Organized asset management with version control
- Script/Style Optimization - Remove unwanted bloat and optimize performance
- Google Tag Manager Integration - Configurable GTM implementation
- Content Security Policy - Enhanced security headers
- Oxygen Builder Support - Specialized functions for Oxygen Builder
- Core REST API - Featured images and CORS headers
- Yoast SEO Integration - Uses Yoast's native REST API fields
- Future-Proof Design - Automatically captures new SEO plugin features
custom-plugin/
├── init.php # Main plugin file
├── core-rest-integration.php # Core REST API functionality
├── bloat-remover.php # Script/style optimization
├── GTM.php # Google Tag Manager
├── oxygen-functions.php # Oxygen Builder functions
├── csp.php # Content Security Policy
├── css/
│ └── style.css # Custom styles
├── js/
│ └── script.js # Custom JavaScript
└── README.md # This file
- Download the plugin files
- Rename folder to your website name + "-custom" (e.g., "examplewebsite-custom")
- Edit
init.phpand change the plugin name in the header - Zip all files and upload to WordPress
- Activate the plugin in WordPress admin
- Plugin automatically activates all features
- No configuration required for basic functionality
- Edit
GTM.phpfile and replaceGTM-XXXXXwith your actual GTM ID - Or use WordPress options:
update_option('custom_gtm_id', 'GTM-XXXXXXX');
- For Oxygen Builder sites, the plugin automatically loads CSS after Oxygen's styles
- No additional configuration needed
- Edit
bloat-remover.phpto remove unwanted scripts/styles - Configure specific pages, post types, or site-wide removal
All public post types automatically get these additional fields:
featured_image- Featured image data with dimensions and alt text
✅ RECOMMENDED: Use Yoast's Native REST API Fields
Yoast SEO provides comprehensive REST API data through its built-in fields:
yoast_head- Complete HTML head datayoast_head_json- Structured JSON data with all SEO informationyoast_json_ld- JSON-LD structured data (when available)
Available Data in yoast_head_json:
title- SEO optimized page titleog_title- Open Graph titleog_description- Open Graph descriptionog_image- Open Graph image datacanonical- Canonical URLrobots- SEO directivesschema- Complete structured data (Article, WebPage, Organization, etc.)twitter_card- Twitter card dataauthor- Post author informationarticle_published_time- Publication datearticle_modified_time- Last modified date
{
"id": 123,
"title": "My Post",
"featured_image": {
"url": "https://example.com/image.jpg",
"width": 1200,
"height": 630,
"alt": "Image description"
},
"yoast_head_json": {
"title": "SEO Title - Site Name",
"og_title": "Open Graph Title",
"og_description": "Meta description for social sharing",
"og_image": [
{
"url": "https://example.com/og-image.jpg",
"width": 1200,
"height": 627,
"type": "image/jpeg"
}
],
"canonical": "https://example.com/canonical-url",
"robots": {
"index": "index",
"follow": "follow"
},
"schema": {
"@context": "https://schema.org",
"@graph": [
{
"@type": "Article",
"headline": "Article Title",
"author": {
"name": "Author Name"
},
"datePublished": "2023-01-01T00:00:00+00:00"
}
]
}
}
}All in One SEO (AIO SEO) does NOT provide REST API data in its free version. This is a limitation of the AIO SEO plugin itself, not our custom plugin.
- Free Version Limitation: AIO SEO free version doesn't expose data via REST API
- ACF Bridge Issues: Attempts to create ACF fields for data exposure were problematic
- Data Storage Method: AIO SEO stores data in a way that's not easily accessible via REST API
- Maintenance Overhead: Custom integration required constant updates and debugging
✅ Yoast SEO is the recommended choice because:
- Native REST API Support: Built-in comprehensive REST API fields
- No Custom Integration Needed: Works out of the box
- Complete Data Access: All SEO data available via
yoast_head_json - Structured Data: Full JSON-LD schema support
- Reliable: Well-maintained and widely supported
- Future-Proof: Automatically includes new features
Use Yoast's native REST API fields directly:
// Get SEO data from Yoast
const seoData = post.yoast_head_json;
const title = seoData.title;
const description = seoData.og_description;
const canonical = seoData.canonical;
const schema = seoData.schema;- Content Security Policy - Configurable CSP headers
- Security Headers - X-Frame-Options, X-XSS-Protection, etc.
- CORS Configuration - Configurable cross-origin resource sharing
- Script Removal - Remove unwanted scripts on specific pages
- Style Optimization - Remove unnecessary CSS
- Asset Versioning - Automatic cache busting for CSS/JS
- Custom functionality without theme modifications
- REST API data for headless WordPress
- SEO data integration for custom frontends
- Performance optimization tools
- Complete SEO data exposure via REST API (Yoast only)
- Structured data integration
- Meta data management
- Social media optimization
- Easy GTM integration
- Performance optimization
- Security enhancements
- Custom styling and functionality
- SEO data automatically available when Yoast is active
- CORS headers are automatically configured
- Performance optimizations run automatically
- GTM ID can be changed in
GTM.php - Script/style removal can be customized in
bloat-remover.php - Security headers can be modified in
csp.php
This plugin is maintained by BooSpot.com. For support or customization requests, please contact the development team.
GPL-2.0+ - See LICENSE file for details.
Version: 1.0.2
Requires: WordPress 5.0+
Requires PHP: 7.0+
Tested up to: WordPress 6.4
- ❌ Removed All in One SEO integration (incompatible with free version)
- ❌ Removed Custom Yoast integration (redundant with native support)
- ✅ Simplified plugin structure for better maintainability
- ✅ Updated documentation with clear SEO plugin guidance
- ✅ Recommended Yoast SEO as the primary SEO solution