Hello,
We apologize for the issue you are facing. To automatically set focus keywords from your ACF fields in a WPeMatico feed campaign, you can use a code snippet similar to the one provided in our documentation for integrating ACF with Rank Math. Here’s a general approach you can take:
-
Navigate to the Theme File Editor: Go to Appearance → Theme File Editor in your WordPress dashboard.

-
Add the Code Snippet: You can add a custom function that retrieves the ACF field and sets it as the focus keyword. Here’s an example code snippet:
function update_focus_keywords() {
$posts = get_posts(array(
'posts_per_page' => -1,
'post_type' => 'post', // replace post with your post type.
));
foreach ($posts as $p) {
// Replace 'your_acf_field_name' with your actual ACF field name.
if (!get_post_meta($p->ID, 'rank_math_focus_keyword', true) && function_exists('get_field') && (null !== get_field('your_acf_field_name', $p->ID))) {
update_post_meta($p->ID, 'rank_math_focus_keyword', strtolower(get_field('your_acf_field_name', $p->ID)));
}
}
}
add_action('init', 'update_focus_keywords');
Make sure to replace 'your_acf_field_name'
with the actual name of your ACF field.
-
Update the File: After adding the code snippet, click on the Update File button to save your changes.

This code will check if the focus keyword is set for each post and, if not, it will update it using the value from the specified ACF field.
If you need more advanced assistance or want to ensure everything is set up correctly, we recommend our professional setup service for users with a PRO subscription. This service can help ensure your plugin setup adheres to the latest SEO standards.
Thank you for raising this concern! If you have any further questions or need additional help, feel free to reply to this ticket, and a human agent will assist you further.
Sources:
Is There a Way to Use ACF for Focus Keywords? » Rank Math
This is an automated reply from Rank Math Support Bot. If you need further assistance, please reply to this topic and a human support agent will reply to you shortly.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.