DiggingIntoWordPress

by Chris Coyier & Jeff Starr

Yearly archives: 2009

The xmlrpc.php File and Site Security

Posted by on

Located in the header.php file of most WordPress themes, there is an important hook called wp_head(). This essential hook enables functions to output content to the browser in the <head></head> area of the web document 1. In newer versions of WordPress, this hook enables WordPress to output the following three lines to your theme’s <head></head> section 2:

Create a Stunning Lightbox-Style Random-Post Header Gallery

Posted by on

In this tutorial, we’re going to take advantage of two of WordPress’ most powerful features, get_posts() and custom fields, to create a stunning random lightbox-style header gallery for your post images. Displayed before the standard post loop, this lightbox gallery will randomly display the images that are associated with your posts while also providing a descriptive title link to the post itself. Here is a graphical representation that will help us visualize what we are going to do:

Free Theme: WP Typo

Posted by on

A big thanks to everyone for being supportive of the launch the website launch for Digging into WordPress. As thank you, and to celebrate our launch, I’d like to present to you a brand new free WordPress theme for you to download. It’s called WP Typo. You can view the demo here and download the theme here. It was designed by myself, then coded through WP Coder (404 link removed 2012/12/29) (as part of this review), and a little additional coding again my myself.

Edit Your Options from the WordPress Admin

Posted by on

Ever needed to update an option in your database without having to log into your control panel or phpMyAdmin? WordPress provides you with an easy way to view, edit and update your database options table (wp_options) by simply opening the following URL in your browser:

Welcome!

Posted by on

Welcome everyone! Jeff and I are very excited to finally have this site launched. This site is going to serve as an outlet for us both to share WordPress related articles, be it news, tips and tricks, best practices, in-depth explanations, new plugins, reviews, and anything else WordPress related! Feel free to explore the archives already, there are a few good ones in there already. We have plenty of stuff lined up too, but right away we’d like to ask:

Redirect Dead-End Category, Search and Tag URLs

Posted by on

Beginning with version 2.5, WordPress automatically handles many types of canonical redirects. A good example of this may be seen by typing your blog address into your browser both with and without the www prefix. If you are using WordPress 2.5 or better, one of these versions of your blog URL will be immediately redirected to the other. The same type of automatic redirect may be seen for several other non-canonical URL variations, and is handled via PHP deep in the WordPress core.

Custom WordPress Title Tags

Posted by on

By default, WordPress provides a decent way of including <title></title> information for your posts, pages, and various archive views. Using WordPress’ built-in template tag, “wp_title()”, we can specify several useful parameters, including:

Unique Body ID’s for your Pages

Posted by on

There are many reasons you might want to get a unique ID for your <body></body> tag. Let’s say you want your header elements to be a different color on your About page, you could apply a bit of CSS via your theme’s stylesheet (i.e., style.css). For example, you could target the About page with something like this:

Dynamic Copyright in your WordPress Footer

Posted by on

Many footers on websites contain text like “© 2009 Your Website”. A good measure, surely. We can use some classic PHP and a built-in WordPress function to make this bit of text dynamic so that it will never need to be tampered with manually again. Here is the code to add to your theme template file (e.g., footer.php):

Code is poetry