views:

29

answers:

2

I want to display the linklist widget only on a certain category.

The current way the sidebar is fetched is:

if (!function_exists('dynamic_sidebar') || !dynamic_sidebar(1))

Which doesnt give me a say in the calling of the links widget. If i put an if clause there, then the rest of the widgets dont get loaded.

So i either need to customize the links widget it self or find a way to call the links widget directly?

And how do i check which category i'm on?

A: 

To print the Category you are on use the_category(' '); Example :<p>Categories: <?php the_category(' '); ?></p> Also have a look at the Documentation http://codex.wordpress.org/Template_Tags/the_category

streetparade
+1  A: 

You can call an indivdual widget by using Conditional Tags « WordPress Codex, like this:

<?php if (in_category('1')) { ?>  call widget here
<?php } ?>

Or (haven't used this myself) load widgets by category, etc: WordPress › Dynamic Widgets « WordPress Plugins

songdogtech