Styling the tinyMCE editor in WordPress

WordPress logoWith WordPress’ easy to use nature and user interface, content management of websites is accessible to a vast range of users, from the Bill Gates’ of the world right through to users who discovered this “internet thing” just yesterday. Once the concepts of “what is a content management system?” and “Okay, so this is the ‘backend’ and the website is the ‘frontend’” have been grasped, the usual question arises: “So, why does the backend content look different to the frontend content?”. To this question, we are about to say one thing: “Question… be gone!” Continue reading

Enhancing the comments list in WordPress

With the introduction of the wp_list_comments() function, WordPress enabled users to easily list comments on the websites without having to manually run a series of loops and queries to get the comments into neat XHTML. This function outputs default code with a selection of options for how this code is structured. Today we’ll be customising how comments are displayed in our WordPress theme, and adding a few extra enhancements to our comments while we’re at it (one of them being the Twitter username we added before). Lets start with the callback, shall we? Continue reading

Storing a Twitter username with comments in WordPress

Follow me on TwitterWe’ve all seen this before when commenting on a blog post we’ve just read. The standard comment form on a WordPress-driven website asks for a user’s name, email address (not published), website address and their comment. What if we could get some other information from the user*, and later integrate that into their comment? Why not get their Twitter username and link back to their Twitter profile as well as to their website? This tutorial will explain how to do just that.

* While this tutorial uses a Twitter username as an example, virtually any additional information supplied by the user can be stored along with their comment (a rating, a selection of their social media profiles, etc). Continue reading

My (updated) WordPress Plugins Toolbox

Blue WordPress logo, courtesy http://wordpress.org/about/logos/Last year, I wrote about my WordPress plugins toolbox, a series of WordPress plugins I find myself using day in and day out. Since then, the list has grown and developed further to adapt to my varying needs when constructing WordPress-driven projects. Below is an updated list of the plugins I find myself using almost always, in addition to the custom tweaks and widgets I’ve written to accommodate my needs within WordPress. Continue reading

Are WordPress.org users missing out?

For whatever reason you began blogging, be it personal or otherwise, one aspect of blogging transcends blog type: comments and commenting. Whether you’re blogging about your most recent holiday or about the latest piece of technology, it’s always a nice feeling to receive a comment on your post. A large part of receiving comments on blog posts is, I believe, community related. If there is a community around your blog of regular like-minded visitors who share an interest in your writing, there will surely be more frequent commenting on your blog’s posts.

This brings me to the main topic of this post: do self-hosted WordPress users miss out on natural community interaction? Continue reading

Javascript and WordPress – The Definitive Guide

Using custom JavaScript code in a WordPress theme or plugin is, in many cases, a given. Fortunately, WordPress comes bundled with a selection of popular Javascript libraries (jQuery, Prototype and others) for use with your plugins and themes. Many users, however, simply write the `<script>` tags in the header.php file of their theme or as part of a function in their plugin that is run in the header of the theme being used. This is a potential problem area that can have you, the developer, sitting for ages looking at your code and wondering why plugin `X` isn’t working correctly when theme `Y` is active. This guide aims to provide an understanding of how to correctly enqueue Javascript in WordPress and how to avoid potential Javascript conflicts.

Okay, what are we doing here?

We’re going to enqueue the Javascript files, used by our WordPress plugin or theme, using the correct method and the wp_enqueue_script()function. We will be adding an action to the wp_print_scripts() action and, inside a function within our theme or plugin, running the wp_enqueue_script() function. We will also be including the Javascript in the administration area only, creating dependencies between our various custom Javascript files and enqueuing the scripts on only a specific page in the administration area. Continue reading

Why you need to be on the WordPress Support forums

Do you remember a time when those one or two lines of code just didn’t make sense? When your theme looked different across various internet browsers and you had no idea why? Do you remember when last that happened to you? Those were the times when you more than likely visited a support forum, posting with the final few morsels of energy you had left. Did you find an answer?

Support forums, in general, seem to be notorious for hosting lots of posts about problems, with few posts offering solutions to those problems. I see this on a regular basis on many web development support forums… many queries and few answers. Continue reading

Child plugins in WordPress. An idea?

I’ve been reading a lot over the past few months about child themes in WordPress and how users have found them to be an invaluable resource when creating WordPress themes.

What’s this “child theme” thing?

For those unfamiliar with the concept, the way I’d explain it is as follows:

A user chooses a WordPress theme (or theme framework) which they would like to customise. They then create a new theme with only the files required for the customisation. The main change comes in the style.css file where the theme details are specified. The line “Template” is added to the theme details, which then specifies the folder name of the main theme (chosen above). An example block would like like this:
Continue reading