Support

Account

Home Forums General Issues File Field Type

Solved

File Field Type

  • I am beating my head against the wall right now, so I’m hoping someone can help.

    I have a field inside of a repeater called ‘file_link’ (see link: http://cl.ly/Xqoc).

    The URL needs to be output in the following code:

    <li><a href="<?php the_field('file_link'); ?>" title="<?php the_sub_field( 'link_title' ); ?>"><?php the_sub_field( 'link_title' ); ?></a>

    The ‘link_title’ field, which is also inside the repeater field, outputs as expected. the file_link, however, does not. When I try to var_dump it (using <?php var_dump(get_field(‘file_link’)); ?>), i get NULL.

    I have tried changing the return type to URL (which is actually what it was originally), ID, and File Object, all with no change in result. I simply cannot get the file_link to output anything other than NULL.

    Any thoughts?

    Oh, as a note, I am using the latest AFC 5.0.8 on WP 4

  • The ‘file_link’ is using the_field(); instead of the_sub_field();

  • Thanks! I knew it was something stupid like that.

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

The topic ‘File Field Type’ is closed to new replies.