Creating Post Title TAG on specific category.
-
hi guys,
I was trying to make a tag for every post title in certain category.
Means:
All the posts that fall under Cat: A — will have this following title:
“[A] Post Title 1”
“[A] Post Title 2”I tried to add
<?php if (is_category(‘catnumberhere’)) {
<h2><span>[CAT TAG]<?php the_title(); ?></span></h2>} ?>
somewhere on the index.php or single.php ( the line after <?php if have post blablabla), but the title ended up disappeared.
I tried to mixed it within the <?php if have post, while, and the_post, but it always ended up with error.
Any idea guys? Thank you.
- The topic ‘Creating Post Title TAG on specific category.’ is closed to new replies.