- This topic has 5 replies, 2 voices, and was last updated 1 year, 2 months ago by
Leo.
-
AuthorPosts
-
November 28, 2019 at 4:29 am #1081197
Daniel
Hi,
when I use this code provided by Tom (only the part regarding the commas), the icon before the text is no longer visible (gp-icon icon-tags).
On another dev/test site, the code works, the icon is visible and the comma is removed. But on my prod/staging site, the icon is no longer visible.
Maybe you could take a look at the staging site, what’s wrong?
Thank you very much!
Daniel
November 28, 2019 at 8:45 am #1081729Leo
StaffCustomer SupportHi there,
Have you fixed this?
I’m seeing the icon ok:
https://www.screencast.com/t/ahAQOrsNggLet me know π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/November 28, 2019 at 12:47 pm #1081991Daniel
Hi Leo,
no, sorry – it’s not fixed π
Currently, it look like this (as seen on your screenshot too):
https://prnt.sc/q3iy0zBut, it should look like this:
https://prnt.sc/q3iylfOn the first screenshot, the icon (before the tags) is missing, but I’ve no idea why. On another testing site I’ve used the same code snippet and CSS and the icon and tags list looks normal.
Thank you!
Daniel
November 28, 2019 at 5:40 pm #1082172Leo
StaffCustomer SupportI believe one site is using font icon and the other is using SVG:
https://docs.generatepress.com/article/svg-icons/Try this snippet instead:
add_filter( 'generate_tag_list_output', function( $output ) { $tags_list = get_the_tag_list( '', '' ); return sprintf( '<span class="tags-links"><span class="gp-icon icon-tags"><svg viewBox="0 0 512 512" aria-hidden="true" role="img" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1em" height="1em"> <path d="M20 39.5c-8.836 0-16 7.163-16 16v176c0 4.243 1.686 8.313 4.687 11.314l224 224c6.248 6.248 16.378 6.248 22.626 0l176-176c6.244-6.244 6.25-16.364.013-22.615l-223.5-224A15.999 15.999 0 0 0 196.5 39.5H20zm56 96c0-13.255 10.745-24 24-24s24 10.745 24 24-10.745 24-24 24-24-10.745-24-24z"></path> <path d="M259.515 43.015c4.686-4.687 12.284-4.687 16.97 0l228 228c4.686 4.686 4.686 12.284 0 16.97l-180 180c-4.686 4.687-12.284 4.687-16.97 0-4.686-4.686-4.686-12.284 0-16.97L479.029 279.5 259.515 59.985c-4.686-4.686-4.686-12.284 0-16.97z" fill-rule="nonzero"></path> </svg></span><span class="screen-reader-text">%1$s </span>%2$s</span>', // WPCS: XSS ok, sanitization ok. esc_html_x( 'Tags', 'Used before tag names.', 'generatepress' ), $tags_list ); } );
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/November 29, 2019 at 12:43 am #1082436Daniel
Hi Leo,
yes, you’re right! One site is using font icon, the other SVG.
Your code snippet fixed the problem.
Thank you very much!
Daniel
November 29, 2019 at 9:02 am #1083352Leo
StaffCustomer SupportNo problem π
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.