O'Reilly logo

WordPress 2.8 Themes Cookbook by Lee Jordan, Nick Ohrn

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating tabbed navigation for your theme

One of the easiest visual clues that you can offer your users is that of active and inactive tabs. This lets them know exactly where they are on your site at any moment. In this recipe, you'll learn the markup and styles you need to bring an easy tabbed interface to life.

Getting started

You need to have a basic theme constructed, and need to have separated your main navigation items into their own pages in the WordPress back-end.

How to do it...

For this recipe, we're going to concern ourselves with a simple, one-column site with horizontal, tabbed navigation. While this technique can be applied to a variety of situations, the horizontal tabs are definitely the easiest. Your index.php file should look something ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required