Integrate tinyMCE into a WordPress widget

So, the native WordPress text widget is great, right? It allows users to insert virtually any form of content into a widget, provided they either want plain text or know a bit of HTML. The fact that this widget can be used in multiple instances is also awesome. Recently, I’ve needed to provide a bit more control though. Hence, my integration of tinyMCE.

Before I start, this tutorial assumes that you have a widget up and running (multi-instance or a conventional single instance widget) that has a text area which will be replaced with a tinyMCE editor. This tutorial is only about the integration. In my research on this topic, I came across a support query where a user was experiencing the same issue I was having: the content of the tinyMCE replaced text area was not saving. After a bit of testing, I found the solution.
Continue reading

Custom WordPress Widget – Recent Posts

I’ve just finished the first round of coding of a widget idea I had for my blog this afternoon. This widget is to display recent posts. Yeah, I know, a “recent posts” widget comes bundled with WordPress. This widget is different. :)

In a short sentence, this widget does the following: “Give me a maximum of the latest X posts that aren’t the first X posts, and display them in a list. If there is a custom field that holds an image, grab it’s value and display the image as a square thumbnail”. The reason for this blog post is more to discuss a few things I learned while coding this widget.
Continue reading

The first post

Here it is, at long last. “Lost In Mattyville” is live. :) I have, over the last few months, been experimenting with several ideas for themes, content, an approach, etc…and here it is, version 1.0 of “Lost In Mattyville”.

On this blog, I intend to discuss trends in technology, design, the web, music, WordPress and whatever comes to mind, really. I also would like to share some writing and possibly a few tutorials on things I’ve picked up in either design, code, music or whichever direction this blog takes me in.

Before I move on, some credits and shoutouts I want to put out there.

– Icons used in this theme by Liam McKay of Function Web Design.
– Lifestream widget by Darren Hoyt and Matt Dawson at Category4. Originally created for the Agregado theme.
– Original flickr widget by WooThemes for the Typebased theme.
– Theme inspiration and reference from the BASE theme by FRESH01.

Thanks guys. :)

On a last note for this post, this blog is still under development. If you notice anything that could be better or that isn’t working well, please let me know. I hope you enjoy reading my writings. :)

Post image courtesy stock.xchng.