• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Advanced Custom Fields adding a map

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Advanced Custom Fields adding a map

This topic is: not resolved

Tagged: ACF, advanced custom fields, map

  • This topic has 5 replies, 2 voices, and was last updated 11 years, 12 months ago by deejuk.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • July 20, 2014 at 4:49 am #115018
    deejuk
    Member

    Hi

    I am new to this element of genesis so trying to learn fast.

    I want to add custom field to a single post type. The type of fields include address, post code and a map. I have been using Advanced Custom Fields plugin as it's quite nice to get the back end sorted.

    I have learn't how to display the address field by using the following code (see below) in single.php but I can't figure out how to display the map from a field called map. I see the map in the back end but have no idea how to adapt the code to display it in a genesis front end.

    add_action( 'genesis_entry_content', 'include_data' );
    function include_data(){

    if( is_single() || is_page() ) {
    if(get_field('address')) {
    echo '<div class="address">' . get_field('address') . '</div>';
    }

    }
    }


    WN6 Web Design – North West of England

    July 20, 2014 at 5:21 am #115021
    deejuk
    Member

    Just checked that if I use this it works as well a bit simpler. But the map outputs the words Array

    echo '<div class="detailbox">'.'<p>';
    echo get_field('address').'</br>';
    echo get_field('town_or_city').'</br>';
    echo get_field('map').'</br>';
    echo '</p>'.'</div>';

    If any one knows how to do this I would be really grateful.


    WN6 Web Design – North West of England

    July 20, 2014 at 6:40 am #115023
    Brad Dalton
    Participant

    Have you asked this question on the ACF forums?


    Tutorials for StudioPress Themes.

    July 20, 2014 at 8:52 am #115035
    deejuk
    Member

    I haven't to be honest but they do have examples but they are for regular wordpress and don't seem to work in genesis. I was hoping someone here had had some experience.


    WN6 Web Design – North West of England

    July 20, 2014 at 11:05 am #115052
    Brad Dalton
    Participant

    Link to your site please.

    Your question relates to the use of a plugin which is why i suggested you try the ACF forums.

    Also, the way you have embedded your code will break if its copied and pasted.

    Please embed code correctly if you want it tested.


    Tutorials for StudioPress Themes.

    July 20, 2014 at 11:56 am #115060
    deejuk
    Member

    Thank you for the feed back .. I will ask about around the ACF website.


    WN6 Web Design – North West of England

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble