WordPress

Integration guide for WordPress CMS - the world's most popular website builder

Installation

Target file: functions.php

Quick Integration

Add the following script tag to your HTML. Replace the data-key value with your actual API key.

Script Tag
<script src="https://cdn.antiblocker.io/ab.js" data-style="minimal" data-key="abk_****"></script>

Complete Example

Here's a complete example showing where to place the script in your functions.php file:

functions.php
<?php
function add_antiblocker_script() {
    echo '<script src="https://cdn.antiblocker.io/ab.js" data-style="minimal" data-key="abk_****"></script>';
}
add_action('wp_footer', 'add_antiblocker_script');

Configuration

Script Attributes

data-keyYour unique AntiBlocker API key (required)
data-styleDisplay style - choose one of 6 variants: "classic", "dark", "educational", "friendly", "minimal", or "urgent"

Implementation Notes

  • Add the code to your theme's functions.php file
  • Location: wp-content/themes/your-theme/functions.php
  • The script will be automatically added to the footer of all pages
  • Alternatively, use a plugin like 'Insert Headers and Footers' or 'Code Snippets'

Best Practices

Performance

Place script before closing </body> tag. The script loads asynchronously and doesn't block page rendering.

Testing

Test integration in staging environment before deploying to production. Verify script loads correctly.

API Key

Obtain your unique API key from the AntiBlocker dashboard. Never share your key publicly.

Monitoring

Track detection rates and user responses through the AntiBlocker analytics dashboard.