Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Support Mushrit Shabnam

    (@611shabnam)

    Hi @mattenser

    I was able to create a custom field variable and noticed it brings the custom field data when I tested from my local site.

    Is it possible that you are allowing the field group for posts and not for pages? To check, kindly edit the field group from ACF and check the what you have set for the setting: Show this field group if. Is it for posts or pages?

    Also when you try to show the data in meta description field, first add the content in the custom field. In your case, make sure the field city has some data. Save the draft and then reload the page. Then try to use the variable %%cf_city%%

    When you select the field to work on a specific post type, that field will pull the data for the allowed post type. So the variable for contact page will also work on homepage.

    Thread Starter Matt Enser

    (@mattenser)

    Hey @611shabnam thanks for the reply.

    I have checked and yes; it is set to pages, not post. See this screenshot. Does this look right? It still isn’t working even when updating the pages, reloading, and adding the variable after doing that. Is it okay do this with a published page vs a draft page like you mentioned?

    If I want to use this field on another page, then do I need to add that to the conditions under the Show this field group if settings.

    Plugin Support Mushrit Shabnam

    (@611shabnam)

    Hi @mattenser

    Thank you for the screenshot. I replicated exactly as you did and was able to find the custom field data.

    Yes, your ACF setting is correct. I created a contact us page on my local site and from ACF, I set Show this field group if?settings as page is equal to “contact us”. Then, I edited the page, added content in the custom fields within the page. Then published it. Next, I applied the variable %%cf_city%% and %%cf_zip_code%% noticed the data appears in the meta description field. Please check this screenshot and this screenshot. Also you can check the settings i have in ACF here.

    Yes, you can update the data on the custom field first and then try to use the variable. I tried with published page and it worked from my end.

    Yes. If you wish to use the same field group on other pages, you need to add that to the conditions under the?Show this field group if?settings. Make sure you use and beside the dropdown where you selected “contact us”.

    Plugin Support Jose Varghese

    (@josevarghese)

    This thread was marked resolved due to a lack of activity, but you’re always welcome to re-open the topic. Please read this post before opening a new request.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘ACF Custom Fields is Not Working’ is closed to new replies.