RankMath Addon
The {CODICTS} RankMath Addon plugin automatically sets the post title as the RankMath focus keyword whenever a post is saved or published. This removes the need for authors to manually enter a focus keyword in the RankMath meta box, ensuring every piece of content has a focus keyword set for SEO out of the box.
Installation & Activation
Start by downloading the plugin from the Downloads page on your dashboard on the CoDicts website.
After downloading, install and activate the plugin in WordPress by navigating to “Plugins” > “Add New” > “Upload Plugin” and selecting the downloaded zip file. Click “Install Now” and then “Activate”.
Once activated, navigate to “RankMath Addon” in the WordPress admin sidebar to configure which post types should have their focus keywords set automatically.
Note: If the RankMath SEO plugin is not installed or not active, you’ll see an admin error notice: “RankMath Plugin Not Detected, please install and activate the Rankmath Plugin.” The plugin’s settings and functionality will not load until RankMath is active.
Key Features
| Feature | Description |
|---|---|
| Automatic Focus Keyword | Sets the post title as the RankMath focus keyword every time a post is saved — no manual entry needed. |
| Per-Post-Type Control | Choose exactly which post types (posts, pages, custom post types) are affected. |
| Force Overwrite Toggle | Optionally overwrite existing focus keywords on each save, or only set them when empty. |
| Bulk Regeneration | One-click regeneration of focus keywords across all existing posts of the selected post types. |
How It Works
Every time a post is published or updated, the plugin automatically takes the post title, converts it to lowercase, and saves it as the RankMath focus keyword.
For example, if your post title is “Best Restaurants in Bangkok”, the focus keyword is set to “best restaurants in bangkok”.
The plugin only runs on published posts — drafts, pending, and other statuses are skipped. It also skips WordPress autosaves.
How existing keywords are handled: By default, if a post already has a focus keyword set (either manually or from a previous save), the plugin leaves it alone. Enable the “Force Overwrite” option if you want the keyword to be updated to match the current title on every save.
Settings
Navigate to “RankMath Addon” in the WordPress admin sidebar.
Step 1: Select Post Types
A checklist of all registered post types on your site is displayed (internal WordPress types like revisions, navigation menus, and Elementor templates are automatically excluded).
Check the post types you want the plugin to manage. Only checked post types will have their focus keyword set automatically when posts are saved.
Step 2: Force Overwrite (Optional)
| Setting | Behavior |
|---|---|
| “Overwrite Existing Data On Save?” unchecked (default) | The plugin only sets the focus keyword if the post doesn’t already have one. Existing keywords (whether set manually or previously) are preserved. |
| “Overwrite Existing Data On Save?” checked | Every time a post is saved, the focus keyword is overwritten with the current post title (lowercase), regardless of any existing value. |
Step 3: Save Changes
Click “Save Changes” to apply your settings. From this point on, every time a post of the selected types is published or updated, the focus keyword is set automatically.
Bulk Regeneration
If you have existing posts that don’t have focus keywords set, you can regenerate them all at once from the settings page.
1. Check “Regenerate RankMath Data?”
2. Optionally check “Overwrite Existing Data?” to force-overwrite keywords on all posts, not just those without one.
3. Click “Save Changes”. The plugin loops through all published posts of the enabled post types and sets their focus keywords.
Warning: On sites with a large number of posts, bulk regeneration may take some time and consume significant server resources. Use with caution on production environments. This is a one-time action — the checkbox does not remain checked after saving.
Frequently Asked Questions
Does it work with custom post types?
Yes. All registered post types on your site (except internal WordPress types) appear in the settings checklist. Enable the ones you want.
Will it overwrite a focus keyword I set manually in RankMath?
Only if you enable the “Overwrite Existing Data On Save?” option. With the default settings, existing keywords are preserved — the plugin only fills in the focus keyword when it’s empty.
Does it work on draft posts?
No. The plugin only sets the focus keyword when a post has the publish status. Drafts, pending posts, and other statuses are skipped. The keyword will be set when the post is published.
What format is the focus keyword saved in?
The post title is converted to lowercase and saved as-is in RankMath’s standard rank_math_focus_keyword field. RankMath treats this just like a manually entered keyword.
Can I regenerate keywords without overwriting existing ones?
Yes. Check “Regenerate RankMath Data?” but leave “Overwrite Existing Data?” unchecked. Only posts that don’t already have a focus keyword will be updated.
Troubleshooting
“RankMath Plugin Not Detected” Error
The RankMath SEO plugin must be installed and active. Go to Plugins → Installed Plugins and verify that RankMath is active. The addon’s settings and functionality will not load without it.
Focus Keyword Not Being Set on Save
| Cause | Solution |
|---|---|
| Post type not enabled | Go to RankMath Addon settings and check the post type in the checklist. |
| Post is not published | The plugin only runs on posts with the publish status. Drafts and pending posts are skipped. |
| Keyword already exists | By default, existing keywords are preserved. Enable “Overwrite Existing Data On Save?” if you want the keyword to be updated to match the current title. |
| Settings not saved | Click “Save Changes” after configuring your post types. |
Bulk Regeneration Not Working
| Cause | Solution |
|---|---|
| No post types selected | Enable at least one post type in the settings before running bulk regeneration. |
| Server timeout on large sites | Sites with thousands of posts may experience timeouts during bulk regeneration. Try increasing your server’s max_execution_time or run the regeneration during off-peak hours. |
| Existing keywords not overwritten | Check “Overwrite Existing Data?” under the regeneration option to force-update all posts, including those with existing keywords. |
Settings Page Not Appearing
| Cause | Solution |
|---|---|
| RankMath not active | The settings page only loads when RankMath is detected. Install and activate RankMath first. |
| Insufficient permissions | Only users with the manage_options capability (typically Administrators) can access the settings page. |
For further support, visit codicts.com or contact us at support@codicts.com.