January 10, 2012 at 12:17 pm #1237
and other code that goes in the <head>January 10, 2012 at 1:28 pm #22134Prasanna SPMember
before the closing
</body>tagJanuary 10, 2012 at 3:11 pm #22135
I know where to put the code on a HTML site. What I’m asking is can I put it in with the google analytics code theme options or do a action hook on the google analytics one and put the code in that widget?January 10, 2012 at 4:13 pm #22136Prasanna SPMember
What I meant was to add the script in
footer.phpbefore the closing
Yes, I think you can paste the code along with Google Analytics code in Graphene Options.January 10, 2012 at 6:42 pm #22137
What im trying to do is insert google maps into a page. I’ve done this before in plain websites (html). But i’ve been unable to do it in a webpage that is done with wordpress. An example of what im trying to build is:January 10, 2012 at 7:31 pm #22138JoshMember
Are you using Google Maps to generate the code? If so, they should give you an iframe or embed code. You can switch to HTML while editing a post/page and insert the code where you would like to display the map.
Or, you can use my plugin, and it will add a button for inserting iframes and embed codes for you, if you don’t like HTML. All you’ll have to do is paste the code Google gives you.January 10, 2012 at 8:08 pm #22139
I’m not using the iframe or the embed code to make the google map. I need to have a map made from an external file and have a side bar with the map. Like the one that is linked above.
Embedding a map from the iframe or embed code works nice and easy. But getting that sidebar to work with the map seems to be very difficult. It seems that in order to have a sidebar with the map that pulls the info from the map, the map has to be made with the Maps API. Which is fine for a html website. But for some reason every time i try (many different ways) to put that code into wordpress the map breaks in many different ways.January 10, 2012 at 8:33 pm #22140Kenneth John OdleModerator
and other code that goes in the <head>
Attach it to the
wp_head()action hook. See this: http://codex.wordpress.org/Function_Reference/wp_headJanuary 10, 2012 at 10:00 pm #22141Syahir HakimKeymasterQuote:But for some reason every time i try (many different ways) to put that code into wordpress the map breaks in many different ways.
I may be wrong, but I think WordPress strips out
<iframe>by default, which is why the normal Maps embed code don’t work.January 11, 2012 at 1:06 am #22142
This might sound odd, but using
<iframe>is the only way i can get it to work. I don’t really want to do it this way, I would rather have the map built on the page than on a different html page and just linked in a frame.January 11, 2012 at 4:10 am #22143Kenneth John OdleModerator
Okay, here’s a really weird idea, but it might be what you are looking for.
Try creating just a plain vanilla html file that contains the code for the map and the sidebar like in the link you provided. (Which is very, very interesting…I have never seen Google maps for this purpose.) Upload that to some safe place on your blog, and then use an
<iframe>to place that file on your blog.
Completely untested, but all my brain can come up with right now.January 11, 2012 at 12:44 pm #22144
That is the only way I could get it to work. I didn’t know if a
<iframe>would be the best way of doing it. I was trying to get it to work within wordpress, but everything i’ve tried doesn’t work. (
(Which is very, very interesting…I have never seen Google maps for this purpose.)
Why is this such an odd way of doing it? How else could the data be displayed on the map with a usable sidebar?January 11, 2012 at 6:34 pm #22145JoshMember
I think Ken was commenting on how cool and “fun” this usage of google maps is. Usually, we see it for a business location, or a tourist attraction… never have we seen it used as a “route” with multiple “stops”. I love the idea also!!
I don’t know very much about the google maps api. I’ll try to take a look at it and see how they are reloading that map without having to reload the entire page. I would imagine each link in the sidebar has a script associated with it when you click it… which then loads the corresponding map.
Although I have no idea… but I’ll try to learn a little about it.January 12, 2012 at 3:42 am #22146
You must be logged in to reply to this topic.