Posted on February 26, 2013
Two days ago, Mark Jaquith wrote a post over on Make WordPress Core introducing the new default theme that will be shipped with WordPress 3.6 aptly named “Twenty Thirteen.” This theme is a few steps in a different direction than the previous default themes, colorfully adorned with beautiful typography, a new custom icon font, Genericons, and unique highlighting of the WordPress post formats, a revamped feature that will be one of the hallmarks of the next WordPress release.
I love the new theme and figured this was as good a reason as any to finally switch my personal “blog” (loosely interpreted but mostly a collection of some of my favorite interwebby things) from tumblr to WordPress.
It was a fairly painless process that involved importing all my tumblr content to my wordpress.com blog which held my previously imported blogger content (I’ve been around the blogging block). After having all my blogging content in that wordpress.com account, I was easily able to export/import that content to a newly created network site on this installation of WordPress. Once I was able get all the content imported, I downloaded and installed “Twenty Thirteen,” and pointed my domain, jtsternberg.com to the new site.
The last remaining piece to my Tumblr –> Twenty Thirteen WordPress transformation was to update the IFTTT automation I had set up with my tumblr account to instead use my WordPress site. IFTTT is a great tool and I was able to simply replace the tumblr “actions” with WordPress ones.
But then I came across my first bummer with this setup. IFTTT doesn’t allow you to specify a post format for a newly created post, and obviously my whole motivation for switching to Twenty Thirteen was its beautiful representation of these formats. So I set to googling and came across this post/snippet Patrick Brown. This, of course, was exactly the problem I was looking to solve, so I set out to make the snippet a stand-alone plugin.
Since I don’t care for unnecessary bloat in my posts (even if it’s not seen on the front-end), and there is a bit of a stigma to using shortcodes, I took the plugin a step further by checking the post for the shortcode when a post was saved. If the shortcode was present and the format was specified, It would save the post with the proper format, AND delete the shortcode from the post, leaving your post with its content only.
This shortcode is really only useful for when you are posting from a source that doesn’t allow you to set the post’s format (email post, XML-RPC, IFTTT, etc), but if you want to see it in action, feel free to try it in a post by adding the shortcode (example:
[setpformat format=aside]) and then saving the post.
Download it here: Dsgnwrks Set Post Format Shortcode.
03/08/13 update: Still needs a bit more work. It seems the post is created, and the shortcode is stripped from the content, but the actual post format is not saved (making the whole thing useless). I’ll update when this is working correctly.