Thread Starter
Twig
(@twig)
I want to call it in a normal text widget.
You can’t. The templatetags are PHP code and that’s not executed in text widgets.
You will need a PHP widget. Search.
And then you will need to read about the category template tags: http://codex.wordpress.org/Template_Tags#Category_tags
Thread Starter
Twig
(@twig)
Ive been reading the Category tags page, and I cant really figure out how to call a specific cat with its post count.
<ul>
<?php
wp_list_categories('orderby=name&include=3,5,9,16'); ?>
</ul>
I get that you use that to display the cats, but would the code be:
<ul>
<?php
wp_list_categories('orderby=name&include=3,5,9,16', 'show_count' => 0); ?>
</ul>
orrr…
<ul>
<?php
wp_list_categories('orderby=name&include=3,5,9,16'), 'show_count' => 0; ?>
</ul>
or maybe Im wrong in both?
Thread Starter
Twig
(@twig)
WOW. I feel really stupid now. The whole reason it wasnt working…. there was a space in the code.
<ul>
<?php
wp_list_categories('orderby=name&show_count=1&include=1,5,7'); ?>
</ul>
I knew this was right… and it pissed me off that it didnt work. When it wrapped onto the next line in the text box there was also a space. Anyhow, theres the actual code in case anyone in the future has this question.