Hi!
I’m trying to insert a link field type with class. In my flied group, I created a field with link type to external URL, and I insert my class.
In the cpt where is the field, I insert the URL and the link text.
In my template single-my.cpt.php I use to rpint this field:
echo the_field ( ‘label_of_link_field’);
The results, it’s: the text link,link” and the class there isn’t in the html..
what have I done wrong?
thanks for help!
<?php the_field(); ?>
does not need an echo. (the_field())
Ah, you need to take get_field_object() for getting the class.
This reply has been marked as private.
This reply has been marked as private.