Titles & Metas template variables from ACF
-
Hi guys. Maybe someone can help me with this strange issue.
I have WP site with Yoast SEO (Version 5.2) and ACF (Version 4.4.11). WP and plugins are latest versions.
I added 1 ACF group with 1 field (it text field, with name “text_field” and attached this group to post.
I added post, add new custom field with name “meta_field” (wp custom field, not ACF) for this post, and fill acf field.
In seo title try to use such variables “%%cf_text_field%% %%cf_meta_field%%”. “cf_meta_field” rendered as expected, and show field value, but “cf_text_field” (ACF field) not.In page source i see that all fields are printed:
<script type='text/javascript'> /* <![CDATA[ */ var wpseoReplaceVarsL10n = {"no_parent_text":"(no parent)","replace_vars":{"date":"August 9, 2017","id":"9","sitename":"tempwp","sitedesc":"Just another WordPress site","sep":"-","page":"","currenttime":"10:03 am","currentdate":"August 9, 2017","currentday":"9","currentmonth":"August","currentyear":"2017","custom_fields":{"text_field":"acf_text","meta_field":"meta_text"},"custom_taxonomies":[]},"scope":"post"}; /* ]]> */ </script>
Why this can hep and how to make Yoast working with ACF fields?
- The topic ‘Titles & Metas template variables from ACF’ is closed to new replies.