How do I set the tag page title to show above the description? Tag descriptions appear above the title on tag pages. Please assist.
Example link provided.
Hello….anybody here to help? Support, where art thou?
Hi,
Sorry for the delay. That is actually the title or name of the post type. We have to modify the tag.php template in order to move the tag description somewhere else in the archive page. Look for this block of code around line 24:
<div class="category-term-description">
<?php echo term_description(); ?></div>
Best regards,
Ismael
Yes, had tried moving that snippet earlier before coming here for support. It breaks the styling of the archive page at top – tried in three different locations. Please be specific as to what I actually need to do. That is, where EXACTLY do I put/modify that block of code…..?
Hi,
Sorry for the late reply, instead of modifying the template, try adding this code to the end of your functions.php file in Appearance > Editor:
function tag_page_title_above_tag_description(){
?>
<script>
(function($) {
$(document).ready(function(){
$('#top.tag .tag-page-post-type-title').detach().insertBefore('.category-term-description');
});
})(jQuery);
</script>
<?php
}
add_action('wp_footer', 'tag_page_title_above_tag_description');
This should work for all tag pages.
Best regards,
Mike
Thanks @Mike! Worked! Now that’s what ‘m talking about. Very helpful. Cheers!
Hi,
I’m glad this was resolved. If you need additional help, please let us know here in the forums.
Best regards,
Jordan Shannon