Like the blog? Get the book »

Getting More Fine-Grained with Includes

Getting More Fine-Grained with Includes

I was recently putting together a site where I found it very useful to have a number of small areas of the site as separate chunks of code I could include in templates at will. The site wasn't unusual at all, it just never occurred to me to get this fine-grained with includes before, but I'm starting to do it now and I like it.

3 Ways to Monitor PHP Errors

3 Ways to Monitor PHP Errors

Close monitoring of your site’s PHP errors is crucial to operating a healthy, secure, and well-performing website. When left undetected, PHP errors can reduce performance, waste bandwidth, and leave your site vulnerable to malicious attack. PHP errors usually occur unpredictably and spontaneously, and may be triggered by even the slightest changes to your server configuration, database setup, or WordPress files. Even if your site appears to working properly on the surface, it may in fact be suffering from undetected PHP errors that should be fixed as soon as possible.

Commonly Useful Page Templates

Commonly Useful Page Templates

I find on nearly every one of the many, many WordPress powered sites I take care of, I have at least a couple of special page templates that I set up and use frequently.

Mastering WordPress Post-Revisioning and Auto-Save Features

Mastering WordPress Post-Revisioning and Auto-Save Features

Not everyone loves the post-revisioning feature of WordPress. In fact, some people can’t stand it. On the one hand, it’s nice to have a library of post-draft revisions to drudge through if you should ever make a mistake. On the other hand, multiple copies of every post is a great way to bloat your database with otherwise useless information.

Display a Random Post (with AJAX Refresh)

Display a Random Post (with AJAX Refresh)

I think you'll be surprised at how ridiculously easy this is. We are going to leverage some serious smartness from both WordPress and from the JavaScript library jQuery.

How to Remove the WordPress Version Number

How to Remove the WordPress Version Number

In this DigWP tutorial, we take a look at a the potential security risk inherent in displaying your site's WordPress version number to anyone or anything that happens to stop by for a visit. For anyone who has been working on securing their WP-powered website, one of the most commonly seen security tips around the WordPress-o-Sphere has got to be this:

Move Your WordPress Files Out of the Root Directory

Move Your WordPress Files Out of the Root Directory

I usually recommend that people install WordPress at the root directory of their sites. Even if you intend to mostly use WordPress for a blog, and run it at /blog/, you can still do that when WordPress is installed in the root directory. It's just a matter of changing some simple settings. But just because WordPress is installed and controlling your site from the root directory, that doesn't mean that the WordPress core files need to be located in that same location.

Delicious Recipes for WordPress Page Menus and Page Listings

Delicious Recipes for WordPress Page Menus and Page Listings

There are so many awesome ways to display your WordPress pages. Out of the box, WordPress provides two different template tags for displaying lists of your site’s pages. The first, most-commonly used tag is wp_list_pages(), and the second, lesser-known tag is wp_page_menu(). First we’ll explore the highly flexible wp_list_pages() template tag, and then we’ll dig into the new wp_page_menu() tag. Along the way, we’ll check out some delicious recipes, tips and tricks for creating the perfect WordPress Page Menu.

Making an Expanding Code Box

Making an Expanding Code Box

On blogs that like to share snippets of code like this one, it is common to use the <pre></pre> tag to wrap the code so that the spacing/indenting is maintained and long lines do not wrap. While this is desirable behavior, it can be undesirable to have those un-wrapped lines break out of their containers awkwardly and overlap other content.

Optimize WordPress Performance with wp-config.php

Optimize WordPress Performance with wp-config.php

As you may recall, there are a ton of configuration tricks available for the WordPress wp-config.php file. So many in fact, that I think many people may have missed some of the choice definitions aimed at optimizing WordPress performance. In this post, we’ll explore the best ways to improve your site’s performance with WordPress’ wp-config.php file.

How to Design a Tumblelog Theme for WordPress

How to Design a Tumblelog Theme for WordPress

Tumblelogs are a great way to streamline mixed-media blogging for different types of content. Commonly used tumblelog topics include “Links”, “Photos”, “Quotes”, “Dialogue”, and “Video”. A good tumblelog presents each these different topics with its own unique format while retaining an overall sense of cohesion throughout the entire design.

Putting the_content() into a PHP Variable

Putting the_content() into a PHP Variable

There are probably a couple ways to do this, but here is a really easy one:

ob_start();
the_content();
$content = ob_get_clean();
Free HTML5 WordPress Theme

Free HTML5 WordPress Theme

In an effort to inspire more WordPress theme designers to embrace HTML5, I am releasing the “H5” Theme Template. The H5 Theme Template is a bare-bones WordPress theme built entirely with HTML5 and styled with some basic CSS 3.0.

As you may know, HTML5 provides greater flexibility and interoperability than previous markup languages, and enables us to build well-structured themes that are more flexible, interactive, and semantically precise. So using it to build awesome WordPress themes is a no-brainer.

Spam Link Injection Hacked (and How I Hopefully Fixed It)

Spam Link Injection Hacked (and How I Hopefully Fixed It)

Just recently my other blog CSS-Tricks was hacked. I first found out by a very helpful reader emailing me a screenshot from the mobile version of my site.

Advertise Here

Sign up for the newsletter!

Never spam, only good stuff

Recent posts

Loading...

Random posts

Loading...
© 2009–2017 Digging Into WordPress Powered by WordPress Monzilla Media shapeSpace