0

Hope I am explaining this correctly. I need to style a specific archive page with the taxonomy: dn_campaign_cat and the tag ID: 115; it shows as below on the front end.

www.site.com/campaign-cat/featured/

However, I'm not sure how to achieve this. I've tried different functions to no avail; is_category, has_tag, is_tag, has_term, is_archive, and quite a few others, but it could just be that I have not used them properly.

Below is an example snippet of something I have tried placing in the archive.php file that did not work.

<?php } if ( has_term( 'dn_campaign_cat', '115' )) { ?>
<div class="orange">Test</div>
<?php } ?>

Any assistance would be greatly appreciated.

1
  • You could just do it via CSS because the tag slug will be listed in the body class. So you'd simply prepend any rules for that page to start with body.slug-of-tag .then-your-standard-classes. Mar 12 at 14:49

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.