I want to update the footer social icons links using the text field of ACF
What I done is,
1. Create a new field group called ‘Social Links’,
2. Add new field named ‘Facebook Url’,
3 then tried to access the data using,
<a href="<?php the_field('twitter_url'); ?>" But this not worked.
4. Then I accessed data using
<?php the_field('facebook_url',$instance['87']); ?> This worked but only for home page, when I opened other page the links showing current page url
So, please tell me what mistake I done, and what is the solution for this issue..
And important Rule=
page is equal to Social Links.
It seems like you are trying to show a page-specific field on every page on the site, would that be right?
The Options Page extension will help you here. This allows you to display a field on any page of the site, added into one site-wide options page. This is the opposite of adding fields to pages, that’ll only be accessible when the page is being shown; hence why when you added the post ID to your code, it worked.
To load data from a specific page, you need to use the $post_id parameter to target the location of where the data is saved.
You can read more about this here:
Does this help?
The topic ‘Show text field data in footer(get_footer)’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!