WordPress.org

Ready to get started?Download WordPress

Forums

How to call custom fields in Google Maps bubbles? (2 posts)

  1. sparklogix
    Member
    Posted 2 years ago #

    We are using Google Maps on our site and need to be able to customize the data that comes in on the bubbles when you click a pin. I'm not sure how to call those custom fields, the only thing I've got so far is the link and the post title.

    The code below is in the functions.php file and has dummy data in place of where we need the custom fields to go, I just don't know what to put there:

    if($node == "events")
                            {
                            $html = "<a href='".$post->post_name."'>".$post->post_title."</a>";
                            $html .= "custom-field <br/> <br/>";
                            $html .= "<a href='custom-field' target='_blank'>"."<h1 style='font-weight: bolder; font-size: 14px;'>Get Directions</h1>"."</a>";
                            }

    Any idea? Thanks!

  2. ninjagowoo
    Member
    Posted 2 years ago #

    you would need to use get_post_meta

    If you're asking about interfacing with the google map fields you can check their api

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.