Home Forums Front-end Issues Custom Fields Data Not Displaying on Frontend


Custom Fields Data Not Displaying on Frontend

  • Hi!

    I have already look around plugin documentation and almost tried everything to display values data in my WordPress theme’s font-end, unfortunately I was failed.

    I have also tried all steps in mentioned on

    I have created 2 custom fields having field names – title_long_description and long_description

    And, to render these field’s data on my website page, I have tried all examples shown at but nothing get useful in returns.

    I’ve attached the php template file.

    Can anyone explain what is the problem with the coding? or Kindly provide me some best solution.

    Any help is always appreciated.


  • Hi @lalitme,

    Thanks for the post.

    It looks like you are calling the custom fields outside the main posts loop and thus ACF is not able to reference the value of the current post.

    You will need to assign a post id string as the second parameter to the_field() function like so:

    <?php the_field('title_long_description', $post_id); ?>

  • Thnaks Mr James for the reply.

    No I’m not calling the custom fields outside the main post loop.

    However still I have tried your solution but it didn’t work.

  • Hey all,

    Well, I am not very technically strong in php coding.

    While keep facing the problem in displaying fields data on frontend, I got tired and installed “Pods – Custom Content Types and Fields by Pods Framework Team” this plugin is also great. But I again moved on ACF documentation and found a solution from Get values from a taxonomy term.

    The above threat helped me.

    Thank James.

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

You must be logged in to reply to this topic.