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)

The topic ‘Fields in Content.php’ is closed to new replies.