How’s that for faster? But the shortcodes can also accept attributes. Here’s a list of the other shortcodes I created, and what they do:
[dmyoutube id align title width]
idis the YouTube Video’s ID
aligncan be either left, right, center, or full and sets the alignment of the video
titleis the title of the video
width(optional) is the width to use for the embedded video; if no width is specified, it will default to 160px; the height will be set to ¾ of this value
[dmaudio file title linktext]
fileis the audio file to link to
title(optional) defaults to "Audio Track" if none is specified
linktxt(optional) defaults to "play the song" if none is specified
[dmvideo file align title]
[dmphoto file extension align title caption]
[dmstars 2.5 ratingtype]
So, with so many shortcodes, and so many different attributes, it would be easy to forget how to use them. that’s why I added the quicktags on the post/edit pages for each one. All I have to do is click the respective button and it prompts me for all the necessary attributes. Nice!
If you want to see some of these features in action, have a look around my blog (you can use the searchbar in the header or use the tags listings on the archives page). I converted all my past articles to use these shortcodes wherever there was audio, video or YouTube embedded before. Also, if you’re interested in seeing any of my code, or want help with any WordPress stuff, please don’t hesitate to contact me.
In terms of the theme, like I said, I wasn’t expecting to create my own theme. But after having such an easy time with my plugin functions, I decided, why not? The only theme I could find that I really liked was WPCandy’s v1 WordPress Theme by Michael Castilla, but after realizing that I would still be spending time to modify it to have it the way I wanted (and to incorporate comment threading), I thought, why not make my own theme? I thought about how to re-design my blog and make it fancy, but in the end, I decided to make it a combination of my dmred.ca and DanielMenjivar.com sites, for simplicity sake. I used the included "default" theme as a starting point, but you could say that my blog’s design is very much inspired by the WPCandy theme – thanks a million Michael!
Lastly, since my blog’s design uses a lot of fixed
divs, I decided to create a separate CSS stylesheet for the iPhone and took the time to do the same for my DanielMenjivar.com site too. (Since most people probably don’t know that you can still scroll through fixed divs on the iPhone by using two fingers instead of one… There’s a tip for you!)
Anyways, it was a much more pleasant experience than I had expected. I really wanted to make sure that I didn’t "hack" things the way I did with my last theme and wanted to make sure I did things the right way this time. Lesson learned. Now I can change my theme and update all my plugins the easy way, (with one click), without having to worry about losing features, custom edits, etc. (I will admit, it was sometimes hard to find documentation for some of WordPress’ functions, but for the most part, things were easy to find and went very smoothly.)
Well, this has been a long article – thanks for reading!