List children categories of a post (1 post)

  1. Andrés Sanhueza
    Posted 8 years ago #

    I want to know a way to include a list of children categories for a post. I've found this code

    <?php foreach((get_the_category()) as $cat) {
    if ($cat->category_parent == "180") {
    echo '< a >category_nicename . '">' . $cat->cat_name . '</ a >';

    But I want to put a separator between each one and not after of before all the categories listed. And a way to put something specific before the last categorie listed will be good, also.

Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 8 years ago by Andrés Sanhueza
  • This topic is not resolved
  • WordPress version: 2.3