there’s a point in every wp project (almost) where i need something more than just posts and pages. like stores with longlat data, albums from an artist in the sidebar, etc. now, there are a couple of plugins that do this, like pods and flutter, but they both have their downsides (pods is complexity+doesn’t play nice with wpml and flutter is just plain evil).
so i decided to hack something together which would fill my needs. this plugin cannot collide with anything in wp core or any plugin. please use as you see fit.
1. install the plugin
2. configure your first custom type in the customtypes folder inside the plugin. i’ve included an example type called storelocator which you should be able to rework into your own needs
3. if you enable “showhelp” inside your customtype, you will be presented all the code you need to get this into your templates
4. start inserting and editing content in your new content type!
now don’t go hog wild with this plugin. the plugin stores all data in a single table outside your wp installation and uses serialization/regexps to store/get the data. this means that if you have 1 million rows it will take a couple of seconds for the site to render your data. but if you have 1 millions rows you should probably concider using pods instead (no, not flutter).
click here to download the plugin (v.1.0)
Comments
One response to “simple custom type”
Thanks!
Just what I was looking for. I did found a few bugs which I manage to solve. See the attached patch for further reference.
http://gist.github.com/403159