• I want to display a link in every post to the category of this post, I’ve been able to do this by adding the code

    <?php the_category(', ') ?>

    Now the question is: how can i exclude the “uncategorized” category?

    i figured out if i exclude category_ID of 1 maybe it would be solved. tried this code with no use

    <?php if ( the_category_ID!=1 ) echo the_category(', ') ?>

    is there a simple conditional statement to say: “If the category ID is not 1 display the link“?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘using "if" with category name display’ is closed to new replies.