DiggingIntoWordPress

by Chris Coyier & Jeff Starr

Category: PHP

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