|
|
|
|
|
|
![]() |
#13 |
Oh no, I'm sweating like Roger Ebert
|
I was checking around in the WP template tags today for somthing I want to do on one of my blogs and ran across your solution.
Lets say you have a site http://www.yoursite.com and you want to have different links on your home page than a couple of your category pages. Say you have a cams category and a teen category. Make 3 link categories...one well call blogroll and it is your main index page links. One call cams and the other lets call teens. Where you want the links to appear on your sidebar, add this: Code:
<?php if (is_category(cams)) { echo "<ul>"; wp_get_linksbyname('cams'); echo "</ul>"; } elseif (is_category(teens)) { echo "<ul>"; wp_get_linksbyname('teens'); echo "</ul>"; } else { echo "<ul>"; wp_get_linksbyname('blogroll'); echo "</ul>"; } ?> Disclaimer: I haven't tested it and usually I fuck it up the first dozen or so times before I get it right so be prepared for a little trial and error. |
![]() |
![]() |
|
|