WP List Post Categories.. Can't Figure Out How-To List! Help!

Function:

if (!function_exists('typo_posted_footer')) :
function typo_posted_footer() {
$tag = get_the_tag_list('', __(', ', 'typo-o-graphy'));
$categories = get_the_category_list(__(', ', 'typo-o-graphy'));
if ($tag) {
printf(__('<li> %1$s </li>', 'typo-o-graphy'), $categories, $tag);
}
elseif($categories) {
printf(__('<p>Categories: %1$s </p>', 'typo-o-graphy'), $categories);
}
}
endif;

I’m trying to use this:

<ul>
<?php  typo_posted_footer(); ?>
</ul>

To:

  • Get
  • A
  • List
  • Like
  • This

Instead I’m getting the categories listed out with commas… Follow link look at bottom of the page to see the categories comma separated. Want to <ul><li> each one out.

http://test.madadmedia.com/jon-r-gergeceff/

Help would be greatly appreciated! Thanks! I know it says something about the tag function but I don’t care about tags. Only category.

Let me break down the Functions.php code that I can’t figure out:

$categories = get_the_category_list(__(', ', 'typo-o-graphy'));
if ($tag) {
printf(__('<li> %1$s </li>', 'typo-o-graphy'), $categories, $tag);
}

That %1$s are the “categories.” I can’t figure out how to have this displayed in a <UL> and not comma separated… Someone please help me out here!

THANK YOU!

Scott

Stupidity killed the cat…

$categories = get_the_category_list(__('', 'typo-o-graphy'));
if ($tag) {
printf(__(' %1$s ', 'typo-o-graphy'), $categories, $tag);
}

Remove the whole <UL> and you’re good to go… Lol! But I will be back for more answers… Soon… Probably tomorrow! :rofl:

Love this forum though!