How to Make Your Own Theme – PART 5

Step Five: Customizing the Sidebar

Now that we have the header and the main index template in place, it’s time to tackle the sidebar. For those of you working on a theme without a sidebar feel free to skip this section. But for the sake of some of the more advanced things we’ll be covering, I’d recommend looking it over just to be sure you didn’t miss anything.

Let’s begin once again by taking a look at the “default” source code:

<div id=”sidebar”> < ul>

<li> < ?php include (TEMPLATEPATH . ‘/searchform.php’); ?> < /li>

<!– Author information is disabled per default. Uncomment and fill in your details if you want to use it. < li><h2>Author</h2> < p>A little something about you, the author. Nothing lengthy, just an overview.</p> < /li> –>

<li>   <?php /* If this is a 404 page */ if (is_404()) { ?>   <?php /* If this is a category archive */ } elseif (is_category()) { ?>   <p>You are currently browsing the archives for the <?php single_cat_title(”); ?> category.</p>

<?php /* If this is a yearly archive */ } elseif (is_day()) { ?>   <p>You are currently browsing the <a href=”<?php bloginfo(‘home’); ?>/”><?php echo bloginfo(‘name’); ?></a> weblog archives       for the day <?php the_time(‘l, F jS, Y’); ?>.</p>

<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>   <p>You are currently browsing the <a href=”<?php bloginfo(‘home’); ?>/”><?php echo bloginfo(‘name’)%3

Looking for quality WordPress Hosting? Look no further than Arvixe Web Hosting!

Tags: , , , , , | Posted under WordPress | RSS 2.0

Author Spotlight

TJ Marsh

TJ Marsh

My name is Tj Marsh. I spend about 16 hours a day on the internet. Running my company and helping out here at Arvixe. I live in the good ole Arizona where it gets ridiculously hot. I love WordPress and a lot of other open source software along with coding.

Comments are closed.