MayaViolet Posted August 4, 2021 Share Posted August 4, 2021 Site URL: https://bywater-collective.squarespace.com/photography-journal/madi-garrett Hey y'all - I'm using blog tags as way to target blog post for unique CSS application, and therefore have set the post to hide the names of these specific tags when displayed on the blog post header. However, this javascript is no longer hiding the loose comma that appears, between the visible tag, and the hidden and I'm not sure why.... Would appreciate any help! TIA! Note - would only like to remove commas of the meta item tag, not category <script> $('.Blog-meta-item .Blog-meta-item--tags').map(function(val, i) { this.innerHTML = this.innerHTML.replace(/,/g, ' '); }) </script> Site: https://bywater-collective.squarespace.com/photography-journal/madi-garrett PW: byctest Link to comment
tuanphan Posted August 5, 2021 Share Posted August 5, 2021 On 8/4/2021 at 10:21 AM, MayaViolet said: Site URL: https://bywater-collective.squarespace.com/photography-journal/madi-garrett Hey y'all - I'm using blog tags as way to target blog post for unique CSS application, and therefore have set the post to hide the names of these specific tags when displayed on the blog post header. However, this javascript is no longer hiding the loose comma that appears, between the visible tag, and the hidden and I'm not sure why.... Would appreciate any help! TIA! Note - would only like to remove commas of the meta item tag, not category <script> $('.Blog-meta-item .Blog-meta-item--tags').map(function(val, i) { this.innerHTML = this.innerHTML.replace(/,/g, ' '); }) </script> Site: https://bywater-collective.squarespace.com/photography-journal/madi-garrett PW: byctest Whre did you add the code? Can you take screenshot of tags? I dont see tags here Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
MayaViolet Posted August 5, 2021 Author Share Posted August 5, 2021 10 hours ago, tuanphan said: Whre did you add the code? Can you take screenshot of tags? I dont see tags here Yes - the tag is actually the date beneath the title, "Nov 20 2020" then the comma, then a hidden tag titled "dark-light" that applies a CSS rule to keep the title dark text, and the intro paragraph light text. I applied the code in the Header Injection for the entire site, as well as in the Page Header Code Injection and the Post Blog Item Code Injection in attempt to get it to work! Link to comment
tuanphan Posted August 8, 2021 Share Posted August 8, 2021 On 8/6/2021 at 12:22 AM, MayaViolet said: Yes - the tag is actually the date beneath the title, "Nov 20 2020" then the comma, then a hidden tag titled "dark-light" that applies a CSS rule to keep the title dark text, and the intro paragraph light text. I applied the code in the Header Injection for the entire site, as well as in the Page Header Code Injection and the Post Blog Item Code Injection in attempt to get it to work! Add to Design > Custom CSS /* Hide tags comma */ span.Blog-meta-item.Blog-meta-item--tags { visibility: hidden; } span.Blog-meta-item.Blog-meta-item--tags a { visibility: visible; } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
MayaViolet Posted August 9, 2021 Author Share Posted August 9, 2021 On 8/7/2021 at 8:38 PM, tuanphan said: Add to Design > Custom CSS /* Hide tags comma */ span.Blog-meta-item.Blog-meta-item--tags { visibility: hidden; } span.Blog-meta-item.Blog-meta-item--tags a { visibility: visible; } Always a savior - thank you Tuan! Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.