Archived topic
Remove commas between tags on post
7 replies · Started by Matthew on March 9, 2018
I was wondering if it's possible to remove the commas (",") between tags at the bottom of a post...
I saw a couple questions on here that ask similar, but it also removes the commas on the categories listed.
I tried to disable tags through layout > blog, and then insert after content using if page and then list the tags, but I get the comments there too, and then they are after the previous and next post links... tried to fix that by editing content_single.php, but it didn't seem to work.
Any help would be greatly appreciated.
Thank you!
Hi there,
Can you try this function here: https://gist.github.com/generatepress/18e41e03783b5c7e86402d429e64efc0
Without this part:
$categories_list = get_the_category_list( _x( '', 'Used between list items, there is a space after the comma.', 'generatepress' ) );
if ( $categories_list && $categories ) {
printf( '<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
_x( 'Categories', 'Used before category names.', 'generatepress' ),
$categories_list
);
}
Let me know.
Thanks for your reply.
That gets rid of the commas in the tags, but also completely removes the categories, which I don't want to do.
Can you give this a shot? https://gist.github.com/leohsiang/87dcfe0defa207cdc025cb9004998ab4
Let me know :)
That did it :) Thank you very much!!
No problem :)
Also want to do this.
Getting error: "Cannot redeclare function generate_entry_meta."
Was attempting to add via code snippets.
You can actually use a filter for this now:
https://docs.generatepress.com/article/generate_term_separator/
Please open a new topic if you need further help with this.
Thanks!