Jump to content

Change "Written by" to "By"

Recommended Posts

  • Replies 9
  • Views 1.9k
  • Created
  • Last Reply

@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 responsehttps://m.me/dejaegherryan

 

Link to comment
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
  • 4 weeks later...

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

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
  • 3 months later...
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
  • 3 months later...
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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.