- This topic has 5 replies, 3 voices, and was last updated 1 year, 6 months ago by
David.
-
AuthorPosts
-
August 12, 2019 at 10:40 am #982287
Michael
Hi,
Sometime ago, I had added this code to add the categories and tags under the titles on posts:
add_action( 'generate_after_entry_title', 'tu_add_meta_below_title' ); function tu_add_meta_below_title() { $categories_list = get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'generatepress' ) ); $categories_list = sprintf( '<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>', _x( 'Categories', 'Used before category names.', 'generatepress' ), $categories_list ); $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 ); ?> <div class="entry-meta"> <?php echo $categories_list; ?> <?php echo $tags_list; ?> </div> <?php }
After I updated GP, these broke, no longer are seperated by commas, and no longer have their little image with them.
The attached URL is the site where I’ve updated GP.
August 12, 2019 at 4:49 pm #982484Tom
Lead DeveloperLead DeveloperHi there,
The post you linked to only has 1 category and 1 tag, which is likely why there aren’t any commas. Is there a post I can check out that has multiple categories/tags?
As for the icons, try adding this CSS:
header.entry-header span.cat-links:before, header.entry-header span.tags-links:before { display: inline; }
Let me know 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentAugust 13, 2019 at 7:45 am #982921Michael
Hi Tom, commas reappeared by themselves…weird…maybe a cache refresh?
That CSS worked to add the icons back, but the tags and categories used to be on seperate lines like they are in the bottom section. Anyway to get that back?Also I editted by first post and included a link to a page that has multiple tages.
Thanks
Mike.August 13, 2019 at 9:50 am #983200David
StaffCustomer SupportHi there,
try adding this CSS to stack the links:
.entry-header .cat-links, .entry-header .tags-links { display: block; }
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/August 13, 2019 at 12:08 pm #983304Michael
Thanks man, worked like a charm. Back to its old beautiful self.
August 13, 2019 at 12:13 pm #983310David
StaffCustomer SupportGlad we could be of help
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.