• Resolved blakedouglas

    (@blakedouglas)


    New to wordpress. in my post it will not list more than one category to the published post when multiple categories have been selected. I located the code in the single.php and figured out this code $cat = $cat[0] list the first selected category. My question? what is the script to show all categories selected after publishing the post?
    Code from my single.php
    <h2 class=”post_cat”><?php $cat = get_the_category(); $cat = $cat[0]; echo $cat->cat_name; ?></h2>

Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘list multiple categories in single.php’ is closed to new replies.