Answer the question
In order to leave comments, you need to log in
How to display a link with social icons through acf?
There is such a block with icons. I want to make this block through acf. Here is the code
<div class="d-flex icons">
<p>
<a href="<?php the_field('social'); ?>"><i class="fab fa-instagram"></i></a>
</p>
<p><a href="#"><i class="fab fa-google-plus-g"></i></a></p>
</div>
<a>
. What am I doing wrong ? Tell me please.
Answer the question
In order to leave comments, you need to log in
You need to debug if there is a value bound to social. You can do var_dump(the_field('social')); to see if that value exists at all. You can check how this field is stored in the database. The documentation https://www.advancedcustomfields.com/resources/get... says that without other arguments, this function displays data for the current post, are you sure you correctly bound the field to the post?)
1. Read the function documentation the_field()
2. Find out what your variable isvar_dump( get_field('social') );
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question