WordPress Themes: Creating the Sidebar
Tutorial navigation:
Starting Your Custom Theme
Creating the Loop
Creating the Footer
Creating the Sidebar
Adding Comments
Finishing Your Custom Theme
The side bar is not a required file but it’s a usefull one. The sidebar will display vertically down one either side of your blog next to the loop. This is where you’ll want to put the search feature, category lists and any other information you choose. To select which tags you want to include on your side bar visit the <a href="http://codex.wordpress.org/Template_Tags" target="_blank">WordPress Template Tag list </a>. I’ll list the tags that I use and find helpful. Remember pages, archives, categories etc are outputted as lists and will accept list formatting and css styling. These all go in sidebar.php file.
<?php wp_get_archives(‘type=monthly’); ?> Archives, this tag displays a list of archived posts by month. The link provide gives other options for archive display.
<?php wp_list_cats(’sort_column=name&list=1&hide_empty=1′); ?> Categories, this tag displays categories on your blog.
<?php wp_get_archives(‘type=postbypost&limit=5′); ?> Latest entries, this displays the latest entries to the blog. The number shown can be edited. This is the same as archives but given a different property
<form method="get" id="searchform" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<b>Search</b><input type="text" value="<?php echo wp_specialchars($s, 1); ?>" name="s" id="s" size="15" />
</form> Search box, this allows readers to search your site/post.
Link list, this tag lists your links and the category they are located in.
You can also add more information such as links to your RSS feeds, button banners etc. After you are finished adding content to your sidebar save your file. Continue to WordPress Themes: Adding Comments
4 Comments »
|
[...] navigation: Starting Your Custom Theme Creating the Loop Creating the Footer Creating the Sidebar Adding Comments Finishing Your CustomTheme [...] |
|
| Pingback by Web Savvy Mama » WordPress Themes: Starting Your Custom Theme — February 3, 2007 @ 7:07 pm | |
|
|
Hello agian, I read all the info on your blog about the sidebar but still don’t get it. I just don’t get it, I must have deleted some type of line b/c my cart isn’t showing up at all, there category area (shopping area) is completely blank, basically my site is just the template right now. |
| Comment by Rencie — February 7, 2007 @ 6:14 pm | |
|
|
Rencie… your sidebar is a cart side bar and the cart is OC. This tutorial is for WordPress blogs, totally different than carts. |
| Comment by Kristine — February 8, 2007 @ 10:24 am | |
|
[...] navigation: Starting Your Custom Theme Creating the Loop Creating the Footer Creating the Sidebar Adding Comments Finishing Your CustomTheme [...] |
|
| Pingback by Web Savvy Mama » WordPress Themes: Adding Comments — February 9, 2007 @ 7:13 pm | |
RSS feed for comments on this post. TrackBack URL
Leave a comment
| You must be logged in to post a comment, |
| or you may log in using Facebook connect. |


