Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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.

add comment

2 Answers 2

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

<?php
/*
 Template Name: google map
*/
?>
share|improve this answer
add comment

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
add comment

Your Answer

 
discard

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.