How to Add the Parent Category as a Class in body_class()

December 16, 2009

WordPress 2.8 came out with a bang, offering some great new functions for using in your templates. One of these is called body_class. It’s a simple function you include in the body tag that will automatically add a class to the body tag that is specific to the page you are on. For instance, if …

Read More

WordPress: Create a Page Template that Paginates Posts from a Certain Category

September 4, 2009

Update! There is a much better method for accomplishing this. Just skim the comments on the post to see how many people have had issues with this outdated method. Learn more about creating custom category templates. One of the most important tools WordPress provides a custom theme developer is the simple ability to create custom page templates …

Read More

How to Use Categories as Your Navigation Bar

April 19, 2009

I wrote a post a few months back that discusses >how to use pages in a horizontal navigation bar. It’s a pretty standard thing to see a horizontal navigation, but a lot of blogs that don’t pull as much focus to their static pages are using their categories as their main navigation. If you’re wanting …

Read More

WordPress: How to Determine if a Certain Page Exists

January 25, 2009

I am developing a new premium theme called “Tidings” which will be a news theme unlike most I’ve seen available. One module on the front page will contain recent comments or “discussions”. I want to give the user the option of having an entire page for discussions (i.e. listing the most recent comments), and then …

Read More

WordPress: How to Use Pages in a Horizontal Navigation bar

December 15, 2008

One of the first things I do when I create a new WordPress Theme design, is to remove the page listing from the sidebar, and give it more prominence in a horizontal nav bar. Even if you use WordPress as a blog, putting your pages in the header area of the layout makes them stand …

Read More

WordPress: How to List Child Pages in Sidebar

July 22, 2008

One of the most common things to do with your wp_list_pages, is to use css to create a horizontal navigation. A problem can sometimes occur when you decide later to add another page s a child to an original page. WordPress by default will begin a child ul within the parent li and most of …

Read More

How to Display the Parent Page Title in Your Title Meta Tag

June 24, 2008

In a project I’m working on at the moment, The page structure is set up using 5 main pages, and then each have their respective sub-pages. For SEO purposes, I wanted my <title> meta tag to display the page title and it’s parent page title if the current page was a child page, i.e.: <title>Page …

Read More

Multiple Widget "Sidebars" in WordPress Themes

April 27, 2008

Most WordPress users love the ability to customize their front end functionality with easy to use widgets. All you do is drag and drop, make a few minor customizations if you want to, and bingo bango, customization in a flash! But something that recently stumped me was.. how can I make more than one sidebar …

Read More

1 2 3 4