Support

Account

Home Forums General Issues unable to get post data out of field group

Solving

unable to get post data out of field group

  • ok so I have a Field Group called Pub Data and then I have a a custom field called: pub_name

    I have setup a template with 2 pubs added to the group with the following code:

    if(get_field('pub_name'))
    {
    	echo '<p>' . get_field('pub_name') . '</p>';
    }

    I can’t get any data out??!

    Please help

  • There isn’t enough information in your description to help you.

    Where does the field group appear, on a post type, a category or term, on an options page, somewhere else?

    What template are you trying do show the fields on, a page template, something else?

  • Does/did the page/post exist prior to creating the group and or fields within the group. If the post/page is not saved/updated “after” the field is created it doesn’t exist in the post meta and will return nothing.

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

The topic ‘unable to get post data out of field group’ is closed to new replies.