Archived topic
Displaying Tags below Post Title
2 replies · Started by Karl on March 30, 2018
Hi everyone
I'm using this code in my child theme functions.php to display the post tags below the post title:
add_action( 'generate_after_entry_title', 'tu_add_meta_below_title' );
function tu_add_meta_below_title() {
$tags_list = get_the_tag_list( '', _x( ', ', 'Used between list items, there is a space after the comma.', 'generatepress' ) );
$tags_list = sprintf( '<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
esc_html_x( 'Tags', 'Used before tag names.', 'generatepress' ),
$tags_list
);
?>
<?php
}
Which works brilliantly (found on another post of this forum!)
However, if I choose to remove the post date using the Blog plugin, the tags get removed too.
have I done something wrong with code above?
Many Thanks
karl
That's strange, can you link me to a page where that's happening?
Hi Tom
I managed a to remove the date using: .posted-on{display:none;} (I use a child theme, so that's in the child style sheet.)
I'll contact you with a url / login if you'd like to replicate the issue. Feel free to change the settings you need to see the issue!
Thanks for your help and all your hard work!
Karl