January 2017 Meeting
Steve Borsch will be telling us about the new Minnesota WordPress Directory and Michael Moore is talking about using spatial data in WordPress.
Putting Where into WordPress: Using spatial data in WordPress
What is spatial data and why would you want to use it in WordPress?
Spatial data is location information. It could be a point that indicates the location of the state capitol building, or it could be a line that shows the path of a road or river. It could even be a polygon that shows the boundaries of a state, school district or country.
If you have spatial information you can change what content is displayed based on the user’s location or preferences. You can allow extremely powerful search operations that simply aren’t possible using standard queries. For example, you could:
- Show custom content to users near your store or to customers out of state
- Let users search for homes within a given school district
- Sort a list of events by distance from a given place
- Create a knock off Pokémon-Go?
And of course, you could always show that location information on a map if you want to!
How can you store that sort of information in WordPress though? Sure, for points you could store latitude and longitude information as postmeta, but what about the line or polygons? Once you’ve stored them in WordPress somehow, how are you going to search by location?
MySQL, the database behind WordPress, has good spatial support these days with native spatial data types, spatial indexes and a bunch of useful spatial data functions. Let’s talk about how to take advantage of these capabilities within WordPress to collect, store and search spatial data.
During this presentation we will:
- Quicly cover some spatial data basics
- Briefly review what MySQL can do
- Look at how the free WP-GeoMeta plugin works
- Inspiring demo time!
The bulk of the time will be spent on demos which should inspire you to include spatial capabilities in your sites and projects. Spatial data can add tremendous value to many types of websites both for users and for businesses.
If you’d like to look at some of the plugins we’ll be using ahead of time, you can take a look at:
- WP-GeoMeta — https://wordpress.org/plugins/wp-geometa/
- Custom Post Type UI — https://wordpress.org/plugins/custom-post-type-ui/
- Advanced Custom Fields — https://wordpress.org/plugins/advanced-custom-fields/
- GeoMeta For ACF — https://wordpress.org/plugins/geometa-acf/