0

I would like to put an ACF field in the of my the_terms function, is this possible? Because I can't figure out how to put it.

    <?php $dev = get_field ('my_field', 'option');?>
    <?php the_terms (get_the_ID(), 'my_taxo','<h3> **HERE PHP CODE ?** </h3><ul><li>','</li><li>', '</li></ul>');?>
4
  • First your $dev should have get_field ('my_field', 'options'); not option. Second where exactly you would like to put your $dev value ?
    – divy3993
    Commented Jul 16 at 18:11
  • Thank you for your answer, Indeed error on the thank you option. Concerning the value I would like to put it in the h3 tag
    – user188850
    Commented Jul 17 at 7:53
  • First I would check if I getting the desired value in $dev var, and then just append it in place of ***Here PHP CODE?*** I don't understand where exactly you are struggling.
    – divy3993
    Commented Jul 17 at 14:41
  • 1
    I found, it was just a quote-unquote story. If there's ever another tip I'm interested <?php the_terms (get_the_ID(), 'events_cat',"<h3>$dev</h3><ul><li>",'</li><li>', '</li></ul>');?>
    – user188850
    Commented Jul 17 at 15:59

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.