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


Show text field data in footer(get_footer)

  • 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.

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

  • 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.

  • 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?

  • 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 🙁

  • 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?

  • footer is single page which is included in every page,

    <?php get_footer() ?>

  • 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?

  • Is the issue with your code:


    Shouldn’t it jst be 87?

    As in

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

  • please how can i use advanced custom field to edit my footer in wordpress?

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

The topic ‘Show text field data in footer(get_footer)’ is closed to new replies.