How to add a counter to your post_class in WordPress

For the redesign of this site, I wanted to implement various design elements, in particular related to the Responsive Design, made possible by iThemes Builder.

One of those elements is that when visiting the home (blog index) page in mobile view, only the excerpt on the first post is displayed, all other posts are displayed as titles only. Of course, I could have edited the theme file to add a counter, and conditional code to display or not display the excerpt. However, I try to minimise changes to template files, and prefer to use a function, and CSS to accomplish such functionality.

I [...]

How to add featured image thumbnails to WordPress posts and pages, the easy way

Since WordPress version 2.9, featured images (formerly known as "post thumbnails") are integrated in the Write Post and Write Page panel. Not all WordPress themes make use of these fields, and a change to your template files is required.

In this post I will explain how you can add Featured Images to your posts and pages with only a modification to your functions.php file, and some basic styling using css. This is in particular useful when you have multiple Page templates, and therefore need to update several files to incorporate the featured images in each page.


How to register and list users based on user roles in WordPress

The idea for this came from a request, where the customer wanted to allow users to register online, and then allow these users to be able to view a list of all other users that have registered. Regular site members, such as subscribers, editors, authors or contributors however should NOT be included, and neither should these (standard WordPress roles) have access to the page that lists these "special" users.


My First DokuWiki Plugin

Well who would have thought I'd start writing DokuWiki plugins for a change. It's a bit of a workaround plugin, due to an issue in a WordPress - DokuWiki login bridge that I've implemented. All wiki content was being escaped (addslashes), so that "you're" became "you\'re". I have yet to find a real solution for this, whether it is the bridge, or dokuwiki, but for the time being, I can move on without polluting the wiki pages by using this plugin:


Page template for iCompany without a grey bar

As requested in this post on the iThemes support forum, here are the instructions to create a page template for the iCompany Theme series by iThemes (these instructions will most likely work for iCar and iRealEstate as well). This template will not have the grey bar and the featured area, and the main content will expand to the right until the right tabber sidebar.