Home Forums General Issues Show text field data in footer(get_footer)


Show text field data in footer(get_footer)

    • Darpan

    • July 5, 2013 at 11:10 pm

    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.

    • Darpan

    • July 5, 2013 at 11:13 pm

    actully in step 3. 3 then tried to access the data using, ” But this not worked.

    • rmdev

    • July 6, 2013 at 12:40 am

    Hi Darpan,

    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.

    • Elliot

    • July 6, 2013 at 10:53 am

    Hi @darpan

    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?

    • Darpan

    • July 6, 2013 at 3:23 pm

    Hello @rmdev,
    Thanks for your reply, Options Page extension will help,but unfortunately its not free..

    I tried that before posting thread here, that works but the links shown on only the index or home page not other pages, that’s the problem 🙁

    • Elliot

    • July 6, 2013 at 4:39 pm

    Hi @darpan

    Sorry mate, I’m not following what the issue is.

    You have a page for all your social data. This is acting as a ‘static’ page and has an ID of 87, arn’t you trying to always show the ‘static’ social data from p 87 on all page’s footer?

    • Darpan

    • July 6, 2013 at 4:56 pm

    footer is single page which is included in every page,

    <?php get_footer() ?>

    • Elliot

    • July 6, 2013 at 5:29 pm

    Hi @darpan

    Sorry, I am still confused.

    Footer is not a page, but yes it is included on every page. That is the role of a footer.

    Can you please re explain your issue clearly?

    • Elliot

    • July 6, 2013 at 5:30 pm

    Is the issue with your code:


    Shouldn’t it jst be 87?

    As in

    <?php the_field('facebook_url',87); ?> 
    • Darpan

    • July 6, 2013 at 5:52 pm

    Thanks <?php the_field('facebook_url',87); ?> this works.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.