Home Forums General Issues Fields in Content.php


Fields in Content.php

  • Hi,

    I’m new to ACF..
    I created a text-field in ACF (WordPress backend) and the I was able to write in content.php (of my theme post) the right script to let wordpress show the field in front end page.


    $asdrees = get_field( ‘address’ );
    echo ‘<div class=”myclass”>’; //whatever you like to wrap around(pre) your field
    echo “$address”;
    echo ‘</div>’; //whatever you like to wrap around(after) your field


    But when I use another type of field like Choice->Select, I have probably to use a different PHP code. Could you suggest me where I can find the list of script to put in PHP the right code for each single type of ACF field?

    Thanks a lot

Viewing 1 post (of 1 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.