• Resolved VM

    (@vmlol)


    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?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support marcanor

    (@marcanor)

    Hello,
    Please check the following KB article on our site regarding ACG plugin compatibility with Yoast: https://kb.yoast.com/kb/advanced-custom-fields-plugin-compatibility/

    Thread Starter VM

    (@vmlol)

    Hi marcanor. Thanks for your answer, but i don’t need include ACF fields into page analysis. I want to use ACF fields as variables in meta title and meta desc.
    In any case i installed plugin and it not help.

    Hi,

    We are not sure if Yoast is able to output ACF fields as template variables. We only know we have a list of support ones here and that you may need to use the custom field name variable: https://kb.yoast.com/kb/yoast-wordpress-seo-titles-metas-template-variables/#advanced-variables

    Thread Starter VM

    (@vmlol)

    Hi,
    Thanks for reply. In that article i saw that i can use post custom field value with template like “%%cf_<custom-field-name>%%”
    And also Yoast SEO correct print my ACF fields and add them in wpseoReplaceVarsL10n javascript variable (i attached code in my first post).
    So looks like it must work, but not working.

    Plugin Support Md Mazedul Islam Khan

    (@mazedulislamkhan)

    @vmlol We can’t offer support on a custom code (needed to change (core) features of our plugin). Since we don’t want to take the risk that we break your website by suggesting an incorrect or incomplete code, we cannot advise you on how to make such changes. Maybe someone watching these forums can assist you further, but if your topic is inactive for 2 weeks, we’ll mark it as resolved to keep the overview.

    Thank you for your understanding.

    Plugin Support Jerlyn

    (@jerparx)

    Closed due to inactivity.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Titles & Metas template variables from ACF’ is closed to new replies.