Display Custom Field Map above blog post

New home Forums Pro Add-on Display Custom Field Map above blog post

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #13569
    grib
    Member

    Hello, I’m using the custom fields lat and long to display a map on a post, however, this displays at the bottom of the content, I would like it to show first, how do I go about this?

    #13686
    Nick Duncan
    Keymaster

    Hi Grib
    You’ll have to change the code of the plugin to achieve this.

    In wp-google-maps-pro.php around line 5994, you should see this :

           $map_data = do_shortcode("[wpgmza id='1' lat='$lat' lng='$lng' parent_id='$parent_id']");
        }   
        
        
        return $content.$map_data;
    }
    add_filter( 'the_content', 'wpgmza_content_filter' );

    Change it to this:

           $map_data = do_shortcode("[wpgmza id='1' lat='$lat' lng='$lng' parent_id='$parent_id']");
        }   
        
        
        return $map_data.$content;
    }
    add_filter( 'the_content', 'wpgmza_content_filter' );
    

    Does this help?

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Display Custom Field Map above blog post’ is closed to new replies.