WordPress Integration

WordPress Integration

How to integrate AIO Radar with WordPress using our official plugin.

Overview

The AIO Radar WordPress plugin handles all API communication automatically. This guide covers how the integration works and how to customize it.

Installation

The plugin isn't in the WordPress.org plugin directory yet: it is installed from a ZIP file we send you when you sign up.

If you don't have the ZIP, email hello@wearego.digital and we'll send it.

Via WordPress Admin

  1. Go to Plugins > Add New > Upload Plugin
  2. Upload the ZIP file and activate

Via WP-CLI

Bash
wp plugin install ./aioradar-plugin-X.Y.Z.zip --activate

Once connected, the plugin keeps itself up to date from AIO Radar.

Initial Setup

1. Connect Your Site

  1. Navigate to AIO Radar in WordPress admin
  2. Click Connect to AIO Radar
  3. Log in to your AIO Radar account
  4. Authorize the connection

2. Run Initial Scan

Bash
wp aio scan --force

Or click Scan Site in the admin dashboard.

3. Generate LLMs.txt

Bash
wp aio llms-txt generate

How It Works

Content Sync Flow

text
WordPress → Scan Content → Transform → POST /api/sites/sync → Database
  1. Plugin scans pages, posts, and custom post types
  2. Content is transformed to sync payload format
  3. Inventory is sent to AIO Radar API
  4. Readiness score is calculated and stored

LLMs.txt Generation

text
GET /api/sites/{id}/llms-txt → Generate → Cache → Return
  1. Plugin requests LLMs.txt from API
  2. API generates content using AI
  3. Content is cached locally
  4. File is served at /llms.txt

Plugin Settings

General Settings

SettingDescriptionDefault
Auto-syncSync on content publishEnabled
Sync intervalHow often to full syncDaily
Include draftsInclude draft postsDisabled

Content Settings

SettingDescriptionDefault
Post typesWhich types to includepage, post
Exclude categoriesCategories to skipNone
Max pagesMaximum pages to sync500

LLMs.txt Settings

SettingDescriptionDefault
Auto-regenerateRegenerate on syncDisabled
Cache durationHow long to cache24 hours

Hooks and Filters

Modify Sync Payload

PHP
add_filter('aio_sync_payload', function($payload, $site_id) {
    // Add custom data to sync
    $payload['custom_field'] = 'value';
    return $payload;
}, 10, 2);

Exclude Posts from Scan

PHP
add_filter('aio_scan_exclude_post', function($exclude, $post) {
    // Exclude posts with specific meta
    if (get_post_meta($post->ID, 'hide_from_ai', true)) {
        return true;
    }
    return $exclude;
}, 10, 2);

Customize LLMs.txt Content

PHP
add_filter('aio_llms_txt_content', function($content, $site_data) {
    // Add custom section
    $content .= "\n\n## Custom Section\nAdditional content...";
    return $content;
}, 10, 2);

Before/After Sync Actions

PHP
add_action('aio_before_sync', function($site_id) {
    // Run before sync starts
    error_log('Starting sync for site: ' . $site_id);
});

add_action('aio_after_sync', function($site_id, $result) {
    // Run after sync completes
    if ($result['success']) {
        error_log('Sync completed: ' . $result['pages_synced'] . ' pages');
    }
}, 10, 2);

WP-CLI Commands

Full CLI documentation:

Bash
wp aio --help

Common Commands

Bash
# Check connection status
wp aio status

# Validate API key
wp aio validate

# Run content scan
wp aio scan --force

# Sync inventory
wp aio sync

# Generate LLMs.txt
wp aio llms-txt generate

# View summaries
wp aio summaries list

Troubleshooting

Connection Issues

Bash
# Test API connectivity
wp aio validate --debug

Sync Failures

  1. Check error logs: AIO Radar > Logs
  2. Verify API key is valid
  3. Check server can reach aioradar.vercel.app (the address the plugin calls)

LLMs.txt Not Updating

Bash
# Force regeneration
wp aio llms-txt generate --force

# Clear cache
wp aio llms-txt clear

Rewrite Rules Not Working

Bash
# Flush permalinks
wp rewrite flush

Or visit Settings > Permalinks and click Save.