04-20-2007, 01:10 AM
|
|
FBOP Class Of 2013
Industry Role:
Join Date: Jan 2004
Location: bumfuck, ky
Posts: 35,562
|
Quote:
Originally Posted by clickhappy
thanks, I just looked and its %category%
but I dont know how to call it
if (cat_name ('anal-sex')) {
doesnt work. Im using the wrong word, but dot know what to use instead of cat_name
|
from here:
http://codex.wordpress.org/Customizing_Your_Sidebar
Quote:
In the WordPress Default Theme, the single.php template file does not request a sidebar. If you view a single post, you will see that the post stretches across the space where the sidebar would have been. Click back to an archive, category, or the front page and the sidebar returns. This Theme has removed the call for the sidebar.
To have a sidebar be different on a different template page, instead of using the default template tag, you can use the PHP command INCLUDE.
<?php include ('sidebar2.php'); ?>
Placed on the single.php or the category.php template file instead of the default tag, this different sidebar would appear on those web pages. You can then customize sidebar2.php to feature whatever information you would like so that it is different than the default sidebar.
If you would like to have a different sidebar on the single.php template file, and another different sidebar visible when viewing an archive or category, edit the archive.php or category.php template files and change the sidebar call to:
<?php include ('sidebar-cat.php'); ?>
<?php include ('sidebar-archive.php'); ?>
Actually, you can use whatever name you want. You can also set up The Loop to call different sidebars dependent upon what you are viewing, and you can learn more about this technique in the WordPress Lesson on Exploring the Loop. You've got the basic idea, and from here, it's up to your imagination.
|
|
|
|