WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have one external page (google_map.php) which contain code to display google map information based on the selection criteria.

And in the wordpress page I want to display the google map which is coded in google_map.php.

I want to ask that how can I add google_map.php page in my wordpress page?

Or other option,

Can i directly add my google_map.php page code to the wordpress page? I don't want to use any plugin to support php code in the wordpress page like Exec-PHP plugin.

Which is the better way?

share|improve this question

migrated from stackoverflow.com Jan 3 '12 at 20:10

This question came from our site for professional and enthusiast programmers.

up vote 4 down vote accepted

It is actually very simple. just

  • add the following text in at begining of google_map.php page
  • upload this page to your theme folder.
  • go to dashboard to create a page, when create a page chose page telmplate: google map.

that is it, you can read more here

 Template Name: google map
share|improve this answer

IMO the best option for what you want to do would be to use the MapPress plugin - the free version works really well and will allow you to embed a customizable google map into any post or page quickly and easily through your admin page editor.

Otherwise you could create a page template and use a php include to call the google_map.php page wherever you want it displayed within your page/post.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.