teresa-t Posted June 16, 2020 Share Posted June 16, 2020 I am using v7.1 to create a site for a client where articles, essays, poems, videos and audio are posted via blogposts. I would like to change "Written by" to simply "By" since not all of the posted works are written. Link to comment
teresa-t Posted June 17, 2020 Author Share Posted June 17, 2020 Thank you but I don't want to hire someone, I'd just like to know how to make the changes myself. Link to comment
RyanDejaegher Posted June 18, 2020 Share Posted June 18, 2020 @teresa-t Add this code to Settings -> Advanced -> Code Injection -> Footer. This will remove "Written By" and just leave it as "By" <script> (function(){ window.addEventListener('load', function(){ var writtenBy = document.querySelector('.blog-meta-item--author') writtenBy.childNodes[0].textContent = writtenBy.childNodes[0].textContent.replace('Written',"") }) })(); </script> Philadelphia, PA 👉 Squarespace Tutorials Chat/Message on FB Messenger for quickest response: https://m.me/dejaegherryan Link to comment
teresa-t Posted June 18, 2020 Author Share Posted June 18, 2020 14 hours ago, RyanDejaegher said: @teresa-t Add this code to Settings -> Advanced -> Code Injection -> Footer. This will remove "Written By" and just leave it as "By" <script> (function(){ window.addEventListener('load', function(){ var writtenBy = document.querySelector('.blog-meta-item--author') writtenBy.childNodes[0].textContent = writtenBy.childNodes[0].textContent.replace('Written',"") }) })(); </script> Thank you so much! This worked perfectly! Link to comment
Bijo_Iceland Posted July 14, 2020 Share Posted July 14, 2020 Hi @RyanDejaegher, can I ask you regarding your quote, - how not just to get rid of "written" in Written By, but also getting rid the "By" as well? here I add before the "By" an Iceland word, which is "Author" in Icelandic, but how can I get rid of the "By" as well? LINK: https://www.tstord.com/verkefnin/hegningarhus THE SCRIPT I USED <script> (function(){ window.addEventListener('load', function(){ var writtenBy = document.querySelector('.blog-meta-item--author') writtenBy.childNodes[0].textContent = writtenBy.childNodes[0].textContent.replace('Written',"Höfundur:") }) })(); </script> Link to comment
Bijo_Iceland Posted July 14, 2020 Share Posted July 14, 2020 I actually got it myself <script> (function(){ window.addEventListener('load', function(){ var writtenBy = document.querySelector('.blog-meta-item--author') writtenBy.childNodes[0].textContent = writtenBy.childNodes[0].textContent.replace('Written By',"Höfundur:") }) })(); </script> Link to comment
GeorgiaB Posted October 23, 2020 Share Posted October 23, 2020 Hi, does anyone know how to do this without code? I don't have the business plan. Building a site via SP is turning into a literal nightmare; I cannot believe I can't change something as simple as this more easily?? Link to comment
rwp Posted October 25, 2020 Share Posted October 25, 2020 On 10/23/2020 at 11:11 AM, GeorgiaB said: Hi, does anyone know how to do this without code? I don't have the business plan. Building a site via SP is turning into a literal nightmare; I cannot believe I can't change something as simple as this more easily?? Post a link to your page please. Link to comment
GeorgiaB Posted October 28, 2020 Share Posted October 28, 2020 Hi :) It's georgiabrisco@gmail.com I ended up just making the author line part of the text. Link to comment
JessieCarvalho Posted January 29, 2021 Share Posted January 29, 2021 On 6/17/2020 at 8:43 PM, RyanDejaegher said: @teresa-t Add this code to Settings -> Advanced -> Code Injection -> Footer. This will remove "Written By" and just leave it as "By" <script> (function(){ window.addEventListener('load', function(){ var writtenBy = document.querySelector('.blog-meta-item--author') writtenBy.childNodes[0].textContent = writtenBy.childNodes[0].textContent.replace('Written',"") }) })(); </script> WORKS GREAT, THANK YOU Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.