Display text based on category of custom post
-
Hello,
I have a theme based restaurant menu and I’d like to add some additional information after the post for that specific category.
For example…
<?php if (is_category('white')) : ?> <p>White wine is yummy!</p> <?php endif; ?>
The problem is, it doesn’t work.
If I do:
<?php if (is_archive('white')) : ?> <p>White Wine is yummy!</p> <?php endif; ?>
It works, but it displays on all archive pages.
I’m guessing I need to specify the category of the custom post type which would be “wines” but I’m just not sure how to implement it.
I have very little knowledge of php, so any help would be appreciated.
Thank you!
- The topic ‘Display text based on category of custom post’ is closed to new replies.