July 9, 2021 . 2 MIN READ
Suppose you want to put your facebook, twitter, linkedIN or flicker profile link as follow us in your site and want manage it from admin panel. What you have to do, just create five custom fields in a post and take the profile URL from that post. Use the URL for each icon as links. I am going to explain the process using a very nice and easy plugin Advanced Custom Fields.

Steps to do:

5. Repeat step 3 and 4 to create five fields.
6. Clicks publish. Now it will look like the image below

7. Use tag the_field(field_ name) or get_field(field_ name) inside your query loop to retrieve the value of the field. Optionally you can visit plugin site to see more query tag.
Here is an example how I query and use the data. For this I create a post and category then use the query like that.
$the_query = new WP_Query(array(‘post_type’=>’post’,’cat’=>4));
while( $the_query->have_posts() ) : $the_query->the_post();
$facebook=get_field(facebook);
$tweeter=get_field(tweeter);
$linkedin=get_field(linkedin);
$flickr=get_field(flickr);
endwhile;
8. Now echo the variables where you want use the urls. That’s it.