Now that Gravatar support is part of the WordPress core adding them into your WordPress theme is easy. Adding them to your comments has been documented. How about adding them to your post titles to highlight the comment author? Within the loop? That’s fairly easy too. Here’s the code:
<?php echo get_avatar( get_the_author_email(), '80' ); ?>
Pretty simple, huh?
get_the_author_email outputs the post author’s email and the “80″ is the size of the avatar image in pixels (you can change that). How this will look depends on how you use it; where you put it in the theme (it has to be in the loop!) and how you style it.
WP-PageNavi, from Lester “GaMerZ” Chan, gives you an awesome upgrade to your WordPress post-page navigation. Instead of the typical “Older Post/Newer Post” links, you get “Digg-like” pagination. Like so:
Very cool. But what if you want to incorporate it into a WordPress theme for release? How do you style it when the instructions tell you to modify the plugin files? Good questions. I’ll tell you how. Continue reading
The handling of plugins in WordPress 2.5 is perfect. It’s superb. It’s easy. It’s cake. But now that I have cake, you know, I want to eat it too. I’ve got a proposal for how upgrading of themes should be handled in WordPress 2.6 (or whenever) using a .org theme repository. Maybe more like a couple of ideas. But watch out! My first item is going to be somewhat controversial amongst theme authors.
Use WordPress Theme Options to Store Footer Text
What prevents people from upgrading their WordPress theme? Changes they’ve made to the theme file. Ignoring changes made to accommodate plugins, there’s really only one spot a theme user would really want to change and have no apparent control over in the admin area: the text in the footer. Theme authors should hand over that power.
One of the first things many new blog owners do is remove the Meta section from their sidebars. Great idea. The Meta information is almost completely useless. And I’m not the only one that thinks so.
The Meta section includes some admin links like “Login” or “XHTML Valid.” While those links might be useful for the owner of the blog, they offer no value at all for the reader. The next time you set a WordPress blog up, start by removing the Meta section from the sidebar. Daily Blog Tips
Well, kinda easy. If you want to implement this on your blog you’ll have to do some fiddling around with your theme. No guarantees that the following technique won’t make your site explode.
Here’s what we want to do. Only show the login block to logged-in users and while we’re at it take the whole thing out of the sidebar and put it somewhere really useful: in a sliding panel that drops down from the top of the page with a click, wherever you are on the page.
I love WordPress, let me get that out of the way at the beginning. But Drupal is really powerful. And terribly exciting—you can do so much with it! But I only like Drupal. Bit of a difference.
I’ll let that serve as introduction to letting you know that I have two projects that will require Drupal as a CMS and I don’t think that WordPress will cut it. WordPress, like I’ve said before, makes a great little CMS. But it’s not for everything. One project is a site for a complex and growing organization that will need finely grained user permissions and the other, a hobby site, is something like a Digg-clone for rating and sorting user-generated content. Sort of the standard “you need Drupal” projects. Continue reading
About 5 minutes after releasing my first WordPress theme, Theseus, upon the world, I had my first support ticket to deal with. Check it out:
Thank you for this awesome theme, but it doesn’t seem to be working for me.
This is what it says after installing and testing it.
Parse error: syntax error, unexpected T_VARIABLE in /home/javitsin/public_html/wp-content/themes/theseus/index.php on line 1
Now a Parse Error happens when, essentially (I say essentially, not exactly, because I’m a designer not a programmer), you make a typing mistake in a PHP file. Thing is, I hadn’t made any typing mistakes—that I could see.
The problem is, I work on a Mac and Macs handle line endings, you know, where you press return, differently than everyone else. Different as in, make Unix computers explode. Unfortunately for me, a lot of web servers are UNIX computers. That explode. Continue reading
This is the scenario: a new visitor, or a visitor returning after some absence, reads through the main page of your blog and clicks a “previous entries” or “older posts” link. Who is this visitor? What do we know about them? Well, 1. they want to read more content (congratulations!) and 2. (in the case of the returning visitor) they’re not subscribing to your blog.
How can we remind them of the benefits of subscribing at just the right moment, when the benefits are clearly apparent? Easy. Use a WordPress conditional template tag.
Google Code is Google’s hosting repository for open source projects. Got an open source project? Google Code will host it for free. Want to make a killer WordPress theme that just plain works? Then Google Code is your best friend. Three projects on Google Code will help you get your WordPress theme done right. A trinity of open-source WordPress theme development tools: Sandbox, Blueprint and IE7.js.