[Resolved] Displaying The Title Of A Single Category
Sort of a newbie question: I need to apply individual category titles as ID’s in the html and CSS.
<div id=”post-<?php the_ID(); ?>”>
<h2 id=”(category name 1?)”>Category of post</h2>
<h3 id=”<?php the_title(); ?>Title of post</h3>
I’ve tried using <?php the_category(); ?> but that writes a full list of categories; tried single_cat_title; the_category_id, and others but they’ve all failed.
What is the correct way of displaying the title of a single category?
- The topic ‘[Resolved] Displaying The Title Of A Single Category’ is closed to new replies.