DiggingIntoWordPress

by Chris Coyier & Jeff Starr

Tag: header

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:

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:

Code is poetry