WPQuestions: A Humbling Experience

It all began with Darren Hoyt’s tweet:

interesting new question over at WPQ courtesy of @jophillips, any ideas? – http://bit.ly/7NOEl3

The particular question was about adding an “old” or “new” class for a listed Links based on whether the Link is inserted less/more than 31 days from now.

Curious, I dug around the Codex and into the core files. I began to think about filtering wp_list_bookmarks. Tabs upon tabs were opened, lines of code tested. Finished, I logged in into my WPQuestions account and opened the page again.

Amazingly, the question was already solved (this is only a couple hours after Darren linked to it), and there I saw two different solutions, both solved the problem with a short and easy to understand piece of code. One of it involved editing core file, which generally is undesirable, but both codes were undeniably elegant and to-the-point.

Continue reading this entry →

Update: Pico WordPress Theme bumped to Version 1.0.5

Pico is updated to 1.0.5 fixing a bug report by Alberto. The download link is still the same (here, direct download to the zip file). Version 1.0.5 is also available on The Theme Directory’s SVN, this way.

Bulletproof WordPress Pages-based Navigation

One of the most used navigation method used in WordPress themes is to list all of the blog’s Pages and put it horizontally on the header area. The code will look like this:

<ul id="nav">
  <li <?php if ( is_home() ) { ?> class="current_page_item"< ?php } ?>>
    <a href="<?php echo get_option( 'home' ); ?>/">Home</a>
  </li> 
  < ?php wp_list_pages( 'title_li=' ); ?>
</ul>

The most important piece there is the wp_list_pages function, which will automatically list all Pages and add class="current_page_item" to the Page link if it’s currently being opened.

Before that function, we add a little more code to display a front page link. Naturally we put it first on the list, and we add our own class for when the front page is currently open. All is well so far, and that is basically the code I’ve been using (including on Pico).

Continue reading this entry →

Introducing Pico, A Magazine Style WordPress Theme

Immediately after wondering why there aren’t more modded premium themes, I set out to mod a theme myself. There were plenty of available themes to choose, but somehow I kept reconsidering this one theme by Darren Hoyt: Mimbo.

If there’s one thing I can tell you about modding a theme, it’s that it is very, very fun to do. Once you understand the coding style of the original author (which in my case was very easy to do thanks to Darren’s clean codes), you’re free to dream up what useful features you want to add to this already awesome theme. I immediately found myself looking into other great themes for ideas (took Widget areas from Thematic and Page Templates from Hybrid, for example) and eventually implemented them.

And this is why modding is such a nice idea: you can immediately go thinking about useful features to add instead of worrying about visual design, building the HTML/CSS from scratch, and so on.

Anyways, enough rambling.

This is where you can read about and download Pico WordPress theme. I intentionally include no screenshot or feature lists here, for everything you need to know about Pico is there, so do check it out.

That landing page does not have a comment area, though. So if you’d like to share your thoughts or have a question you can do it here. Thanks!

Post Updated: Creating Category-based Navigation with Description (a la Grid Focus)

Added a really small (literally, I’m just deleting a character) code tweak in that article to deal with a bug. Visit the updated post here, especially if you’ve used the code.

Recommended Design Articles for WordPress Theme Designers

The way I see it, designing and developing a theme is part of web design in general, and it’s only going to make our themes much, much better in quality if we keep on sharpening our design skill. Sure, it’s important to learn how to code and hack a feature into our theme, but having a good understanding of design is an equally necessary part.

I’m sure we don’t have to worry about the quantity of currently available WordPress themes; but the quality? That’s the kind of improvement I’d like to see in our community, so let’s do this, guys.

Style versus Design. Here, Jeffrey Zeldman explains the importance of looking beyond just focusing on eye candy:

Design communicates on every level. It tells you where you are, cues you to what you can do, and facilitates the doing. Style is tautological; it communicates stylishness. In visual terms, style is an aspect of design; in commercial terms, style can communicate brand attributes.

Learn About Design, Not Making Things Pretty. A short article that will teach us to always question “why” we put a particular element in our design, why we do things this way and not that way, and so on.

You Are Not A Designer And I Am Not A Musician. This is an eye-opening article about the state of web design. The original article was written two years ago and see how little have changed since that time.

4 Principles of Good Design for Websites. The four principles are Contrast, Repetition, Alignment and Proximity, explained clearly with examples.

How to Make Your Web Design Stand out from the Crowd. 3 ways to make your site stand out from the crowd. 3 Powerful Ways To Make Typography Talk On Your Website. These three articles are part inspirational, part practical guides on web design.

Those are some articles that I believed all worth reading and learning. Do you have any recommended articles to share?

How to Update your Themes with WordPress 2.9's New Features

The WordPress 2.9 release announcement post lists a lot of improvements and new features for theme development, however it doesn’t tell much how you can go and apply them. Here I will list some tutorials and resources that I can find about the new features.

The Canonical Post Thumbnail Feature

A complete tutorial at Kremalicious. Teaches you how to activate it for your theme, how to customize the thumbnail dimension, and so forth.

The Canonical Post Thumbnail Feature, in Your Feed

Here’s how you show the post thumbnail in your site’s RSS feed. It uses the same function (get_the_post_thumbnail()), so you’re still able to set the dimension and so on.

Register Theme Support for WordPress Features

the new add_theme_support allows your theme to declare that it supports certain features (one of it is the Canonical Post Thumbnail above). Learn how to use it here.

Sidebar Widget Area Description

Justin Tadlock has it covered in this post.

Remove and Modify the ‘[...]‘ Text at the End of an Excerpt

The Codex is the way to go. Also shows you how to do it for WordPress version 2.8 and below.

Extend the User Contact Info

Add new fields for your user’s contact information (say, to allow them to input their Twitter account). I find it a little bit strange that a feature tied into Dashboard activity (user information input) needs to be activated by codes inside the function.php file of a theme, but there you go.

Order Posts by Comment Count

query_posts() now supports ordering by comment count, an easy way to display the most popular posts.

Customize the Separator between Tags in a Tag Cloud

wp_tag_clouds() now allows you to specify your own tag separator.

That’s all I can find for now. Anything I missed, please let me know at the comments. Thanks!

Page 4 of 9« First...23456...Last »

Latest Links More →

Custom Shortlinks for WordPress

Have your own short domain name for the purpose of shortlinking? Here’s an easy way to combine that with your WordPress install.

The Quick Start Guide to Using Google Webmaster Tools With WordPress

GWT is a great, frequently updated features like showing you search queries volume, malware and crawl error diagnostics and links to your site. If you don’t use it yet, you probably need to. This will help you get started.

WordPress & jQuery Contact Form without a Plugin

I would recommend this either if you want more flexibility or to learn how to code a contact form.

Understanding and cleaning the pharma (spam) hack on WordPress

How to fix that hack:

This attack is very interesting because it is not visible to the normal user and the spam (generally about Viagra, Nexium, Cialis, etc) only shows up if the user agent is from Google’s crawler (googlebot). Also, the infection is a bit tricky to remove and if not done properly will keep reappearing.

Web Safe Fonts Cheat Sheet

An updated (written in April 2010), well researched, CC-licensed Web safe fonts cheat sheet, available both in low-res PNG and high-rest PDF. Even the article is useful as well.

The Nicest 2010 Child Theme You’ll See Today

The Timaru Mental Health Support Trust website, made for charity by Team USA (comprised by web superstars like Jason Santa Maria, Dan Mall, Liz Danzico and Automattic’s John Ford) during the FullCodePress competition, is actually a clever child theme of 2010.

More recap by JSM, Daniel Mall, and Liz Danzico.

WordPress 3.0 Theme Tip: The Comment Form

The simpler way to code comment form (once you understand how hooks and filters work).

Showing and hiding content with pure CSS3

I like it, I think it’s short and easy to understand.