/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $post = $wp_query->post; if ( in_category('press-releases')) { echo '<div class="backToMain"><a href="/buyers-news/category/press-releases/">< Back to Press Releases</a></div>'; exit; } else if ( in_category('media-coverage')) { echo '<div class="backToMain"><a href="/buyers-news/category/media-coverage/">< Back to Media Coverage</a></div>'; exit; } else { echo '<div class="backToMain"><a href="/buyers-news/category/media-coverage/">< Back</a></div>'; exit; } ?>