Assign Attributes To The WP_List_Pages Tag

Our WPCandy v1 WordPress Theme uses a nifty, little script called Scrollovers. A while back when I was developing the theme, I ran into a bit of a problem with the script and WordPress. I wanted to add some bam to the nav with Scrollovers and also use the wp_list_pages tag in order to keep the dynamic nature of the navigation. But see, with Scrollovers, the anchor for a link requires a class and type value of “scrollovers”, which isn’t possible to accomplish with WordPress. As a result, I moved on by simply hardcoding the links in the navigation, as below, and provided the appropriate documentation for users.

Read more…

SEO For WordPress: Part 1

By Sumesh from Blog Creativity, a blog about blogging tips, usability in design, SEO and WordPress (theme/plugin reviews, hacks and WordPress optimization).

WordPress is often praised for its inherent SEO capabilities. The option to use post slugs, clean and valid xHTML (mostly) etc. are some of the reasons for the praise.

However, anyone who inspects a WordPress theme closely will notice that there are several dozen weak points in WordPress themes (in the default theme, freely available themes and even paid themes). Some of these are caused by WordPress core functions (which were developed 5 years ago, since when SEO has evolved), while others are due to designers not willing to brave the choppy waters of SEO experimentation.

Modifying the core functions require extensive hacking (which can be done with proper tutorials), but the changes will be erased during WordPress upgrades. So, the subject of this post shall be mostly about those mistakes caused by faulty theme coding.

In this series of posts, you can read on what the SEO mistakes are, and how to solve them.

Note: The technical aspects of the solution (like code required for various modifications) is beyond the scope of this post. Michael tells me that WPCandy readers are mostly capable of doing such tweaks by themselves, but I will be glad to troubleshoot your problems (if you run into any) at the support forum at my blog.

Read more…

WordPress Template Hierarchy Diagram

If you’ve ever developed a WordPress theme, you’re (hopefully) familiar with the Template Hierarchy and how the WordPress template files fit together like a puzzle.

With WordPress, you have pages that display the content you put on those pages. To style the content on these pages, we use different files in a WordPress theme (duh). But which files are assigned to which pages? That’s where the Template Hierarchy comes in. Depending on what templates are available in the theme, different files will be assigned to certain pages.

“WordPress looks for template files with specific names in the current Theme’s directory and uses the first matching template file listed under the appropriate query section below.” - WordPress Codex

Read more…

How to Setup WordPress Locally on Windows

When designing WordPress themes, it’s nice to be able to store them locally to test them instead of uploading files to a web server. In this tutorial, you’ll learn how to set up WordPress locally on your PC and then manage multiple blogs with their own themes.

Read more…

Skeletize, Nakedize, Visualize and Sexydize Your Tag Display

Mac users always boast about the cool, sleek and sexy UI of OS X, Applications and everything else on their computers. Well, this is not limited to just one platform if you’re on the web. Everybody can design, display whatever they like in whichever way they feel best.

Read more…

WordPress QuickTips

Here’s a little snippet of code that could come in handy: a total post count for a blog. Put this in your page to display the total amount of posts you’ve made:

<?php the_author_posts(); ?>

This might come in handy when you’d like to display the total number of tutorials on a tutorial blog, sites indexed in a site gallery, etc.

Here’s another WordPress QuickTip that will save you some extra keystrokes. Whenever you want to link to an image, place in your site, etc, this little PHP snippet will save you the hassle of typing in the web address:

<?php echo(get_option('siteurl')); ?>

This will display the complete URL (http://www.yoursite.com) wherever you put this tag.

Modifying Individual Posts In The Loop

When coding themes, clients frequetly request things like Google ads being displayed after post #2, the top post having a differently colored background, only displaying the title for a few posts - stuff like that. You can’t do any of this inside a single Loop, so here’s how to use multiple loops to display lists of posts differently.

Read more…

Separating Comments and Trackbacks

One thing I don’t love about WordPress, is its way of including comments, pingbacks, and trackbacks all in one list, and doesn’t provide an easy option to separate them. Separating these gives your comments area a cleaner, more professional feel. Here’s how to do it:

Read more…