Conditional tags depending on category
Hi everyone,
On the homepage of classipress, I would like to show specific criteria on the listing posts, depending on the category of the ad.
For example, if an ad is included in the "real estate" category, I would like to show the number of rooms, and if an ad is included in the "car" category, I would like to show the brand model.
I tried the following conditional tag, without success:
<?php if (is_home('ad-category', 'estate')) { ?>
<?php echo get_post_meta($post->ID, 'cp_rooms', true); ?>
<?php } ?>
I also tried this, but it only shows what I want on the category pages:
<?php if (is_tax('ad-category', 'estate')) { ?>
<?php echo get_post_meta($post->ID, 'cp_rooms', true); ?>
<?php } ?>
All I need is the correct conditional code, for showing specific criteria on the listing ads, which appear on the homepage.
Could you please help me in that respect?
Many thanks in advance.