Support

Account

Home Forums Front-end Issues Text Area not displaying in my theme?

Solving

Text Area not displaying in my theme?

  • I have run into an issue that I have been unable to resolve for hours.

    When I set up a basic ‘text’ field and use:

    <?php the_field('myfield'); ?>

    It outputs no problem.

    But when I make a basic ‘text area’ and use the above it displays nothing.

    Any ideas?

    • James

    • April 1, 2016 at 5:18 pm

    Hi @theplastickid

    That is weird. Both text field and text area field are saved as a string, so it should be compatible. Could you please check if the backend had the correct value when you changed the field type? Could you please debug it like the following?

    var_dump( get_field('myfield', 99) );

    Where 99 is the ID of your post/page that has the field.

    Also, could you please try to create a new text area field and check if it’s working?

    Thanks!

  • Hi James, yes it’s really strange. I have deleted and recreated the custom fields in the plugin.

    When I enter content and go to ‘preview’ the page I can see its outputting correctly. When I click save the content in the custom field text area does not update. Its blank (not saving)

    I have tried multiple browsers and I have also tried uninstalling and reinstalling the plugin.

    • James

    • April 4, 2016 at 1:29 pm

    Hi @theplastickid

    Could you please try to reproduce the issue on one of the WordPress’ stock themes (like Twenty Fifteen) with other plugins deactivated? If it disappears, then you can activate the theme and plugins one by one to see which one causes the issue.

    Also, could you please increase the max_vars variable in your php.ini? This page should give you more idea about it: https://www.advancedcustomfields.com/resources/limit-number-fields/.

    If the issue persists, could you please provide me with temporary admin credentials so I can check the issue for you? You can share it by replying and setting the post visibility to Private.

    Thanks!

  • I am facing the same issue. I created 3 text area fields for my Homepage but only the first one displayed the information successfully. I deleted all 3 fields and created new ones and once again, only the first one worked.

    If I delete the <?php the_field('myfield'); ?> and use plain text, it shows up perfectly in my site.

    I tried debugging and I get NULL as a result on my site. I’m desperate, I can’t find a solution for this. No matter how many times I delete the fields and create new ones with different names, they still won’t work.

  • Any ideas on the above issue, @acf-support ?

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.