Home Forums General Issues Displaying ACF Field Values


Displaying ACF Field Values

  • Hi, I’m new to ACF and I have the backend in WP-Admin set-up already. I assigned the fields to new Projects/Portfolio items and I see the fields in the editor. That part was a breeze and made total sense to me.

    The trouble I’m having is how to display the field labels & values on the website. I am not a WordPress/PHP guru at all, more of a designer. I tried placing the shortcodes but that didn’t work:

    [acf field="{$field_name}"]

    Also tried this:

    <p><?php the_field(‘field_name’); ?></p>

    Do I have to modify the PHP further? I saw the basic usage example but no clue on how to go about this without destroying the site code.

    Thanks for any help, I appreciate it!!

  • Hi Lt_Core,

    I’m totally new to this as well and also having trouble.

    I thought you would customize the shortcode.


    [acf field="{$field_name}"] becomes
    [acf field="{$author_name}"] or [acf field="{$book_title}"] whatever.

    But the values are not populating for me in the post. (Does it have to be a page?) Not sure what I’m doing wrong. Hopefully, someone can pop on really quick and help make sense of it all. I’ve read through everything about twenty times, and I’m still confused. lol

  • I tried the same exact thing, zanzaboonda. It looks like the only way to do this is to modify the PHP template. In my opinion, this goes against the awesome workflow they created for creating the custom fields, which I love!

    If there’s no way to enter shortcodes in the actual post editor then this probably isn’t for me right now. Really hope it can be done, though.

  • Hey guys, shortcodes only work if you create the shortcode in functions.php. Use the the_field php execution. <?php the_field('field_name'); ?>

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

The topic ‘Displaying ACF Field Values’ is closed to new replies.