Mass Editing Posts in Wordpress to include Google Maps

Status
Not open for further replies.

rileypool

paper clique fiend
Mar 8, 2007
1,345
43
0
40
Tulsa, OK
rileypool.com
Rating - 100%
5   0   0
I have a number of websites that are directory-type sites for local businesses. They are pretty old and I'm looking to revive them and work on them in the near future.

Right now the posts just include a name, address and reviews generated for that business.

I want to take that address and input it into Google Maps and display that map within my posts on Wordpress.

Is anybody capable of writing some SQL to mass edit my posts and include an interactive map from Google?
 


One suggestion: export as XML, open it in textpad, find a common word and do a replace with the code for the Maps.. should work..
 
Find a common word? All the addresses are different and there are thousands of posts. Maybe I'm not understanding what you're saying.

If all of your posts have reviews... I would imagine above those reviews... you might have something like:

"Reviews on:"

You have absolutely no foot print from each post to the next?
 
Sorry, I'm an idiot. Yes there is a common word in all of the posts.

I want to keep all the data that's' already there, but just add a map to the post using the address in the post. Is that possible to do.

For example if one post was this: Could I add a map below the address listed and keep the address listed and the phone and fax numbers? The footprint for all posts would be Expertise.

4844 S. Memorial Dr.
Suite 250
Tulsa, OK 74015

Phone: (555) 555-5555
Fax: (888) 555-5555

Expertise: Criminal Law, Civil Rights and Expungements
 
ah.. I thought the Map code was a javascript that was same for all post that would display the map based on the address on the post.

You need to replace every post with a different map code based on the address??

SOme macro expert might be able to help.

Can you give post here two posts (from the WP XML) and the corresponding two map codes..
If the map codes are similar, then it might be easier..

I use the built in macros textedit to manipulate most of my data.
 
ah.. I thought the Map code was a javascript that was same for all post that would display the map based on the address on the post.

You need to replace every post with a different map code based on the address??

SOme macro expert might be able to help.

Can you give post here two posts (from the WP XML) and the corresponding two map codes..
If the map codes are similar, then it might be easier..

I use the built in macros textedit to manipulate most of my data.

Here's an example Google Maps code I took from the site.

Code:
<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=1924+E+6th+St+Tulsa,+OK+74104&sll=37.0625,-95.677068&sspn=51.222969,114.169922&ie=UTF8&hq=&hnear=1924+East+6th+St+S,+Tulsa,+Oklahoma+74104&z=14&ll=36.152068,-95.964393&output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&source=embed&hl=en&geocode=&q=1924+E+6th+St+Tulsa,+OK+74104&sll=37.0625,-95.677068&sspn=51.222969,114.169922&ie=UTF8&hq=&hnear=1924+East+6th+St+S,+Tulsa,+Oklahoma+74104&z=14&ll=36.152068,-95.964393" style="color:#0000FF;text-align:left">View Larger Map</a></small>

<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=6555+S+Lewis+Ave+Tulsa,+OK+74136&sll=36.152068,-95.964393&sspn=0.006437,0.013937&ie=UTF8&hq=&hnear=6555+S+Lewis+Ave,+Tulsa,+Oklahoma+74136&z=14&ll=36.06925,-95.957879&output=embed"></iframe><br /><small><a href="http://maps.google.com/maps?f=q&source=embed&hl=en&geocode=&q=6555+S+Lewis+Ave+Tulsa,+OK+74136&sll=36.152068,-95.964393&sspn=0.006437,0.013937&ie=UTF8&hq=&hnear=6555+S+Lewis+Ave,+Tulsa,+Oklahoma+74136&z=14&ll=36.06925,-95.957879" style="color:#0000FF;text-align:left">View Larger Map</a></small>


Riley, you accomplish the task with custom fields.

Can you explain a little bit more?

It looks like the best way to accomplish this is to wipe the database clean and import everything again.
 
Status
Not open for further replies.