Support

Account

Home Forums Front-end Issues echo php variable value from ACF text field

Solved

echo php variable value from ACF text field

  • Hi and welcome.
    I have two custom fields like this:

    $partner_name = get_the_title($partner_id);
    $email_content = get_field('email_content');

    Is it possible to echo out the variable’s value if I use variable in the ACF Text Field like this:

    echo $partner_name echo’es out correct value but
    echo $email_content echo’es out just a string ‘$partner_name’
    and I need it to echo out the value of $partner_name

    Thanks in advance for any replies!

  • Hi, I just figured it out, I used str_replace() to replace returned from ACF string with my variable.

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

You must be logged in to reply to this topic.