DiggingIntoWordPress

by Chris Coyier & Jeff Starr

What’s the best Caching Plugin?

Really nice article running down the major caching plugins, including some ones I have never heard of. I’m a fan of W3 Total Cache myself, having tried about four of them on various sites. I like the CDN integration, the fact that it doesn’t change your URLs, and that it combines file and database caching. Not to mention it is actively maintained.

Most interesting are the options that turn out to be worse that no caching at all.

CSS-Tricks does nearly 2.5 million pageviews a month and can run OK without caching, it’s just much faster and surge-protected with it on.

Call a Widget with a Shortcode

Posted by on

We covered how to run a shortcode in a widget. But what about inserting a widget with a shortcode? I recently had this situation come up. I had a single page where I just wanted to be able to chuck in a widget without the whole rigmarole of creating a special widgetized area and probably a custom page template for that widgetized area and such. I wanted to just put [widget widget_name=”my_widget”] in the pages content and have that widget pop in. Turns out it wasn’t as easy I wanted it to be, but it’s not that bad…

WordPress Custom functions.php Template, Part 2

Posted by on

In a recent post, we show you how to clean up and enhance the functionality of WordPress with a custom functions.php template. In that post, we explain how using a custom functions.php template can speed up development while optimizing many key aspects of WordPress. In this post, we deliver another prime collection of 15 custom functions to enhance your WordPress site. These functions provide all sorts of useful functionality, including stuff like:

Database Powered CSS in WordPress Themes

“A popular ability in WordPress themes is to add custom CSS driven by options. This brings up a common question, how should the theme inject custom CSS? I’ll outline three different approaches on how to do this.”

Remove/Replace Content from the WordPress Database

Posted by on

A useful tool to have in in your WordPress toolbelt is the ability to quickly and easily search for, find, and replace specific strings of text directly from the MySQL database. We can do this by entering SQL queries either directly or through one of those handy interface applications like phpMyAdmin, which seems like one of the most prevalent PHP applications on servers today.

Display “Time Ago” for Posts or Comments

Turn regular datestamps into more human-readable text (e.g. 22 minutes ago) via a built-in WordPress function.

Update 2014/02/08: 404 link removed: http://www.upthemes.com/2010/03/wordpress-master-tip-display-time-ago-for-posts-or-comments/

Custom Post Types in WordPress 3.0

Still confused about these “custom post types”? We already have categories for Posts and we can use various techniques like post_class to target certain posts with CSS and do different styling. We can also use conditionals to treat posts in different categories completely differently. Why is this going to help?

The big difference is that it actually adds sidebar links to the Admin side specifically for these new types. And beyond that, you can actually declare custom data types for different types. Instead of just “Add Post” and “Add Page”, you can have “Add Real Estate Listing”, which only will ask for “Property Name”, “Description”, “Price”, and “Sale Status”. Powerful stuff!

Code is poetry