Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
teresa-t

Change "Written by" to "By"

Question

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.

Share this post


Link to post

5 answers to this question

Recommended Posts

  • 0

@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

Available for hire

Beyond Copy/Paste: Learn CSS for Squarespace Workshop

Chat/Message on FB Messenger for quickest responsehttps://m.me/dejaegherryan

 

Share this post


Link to post
  • 0
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!

Share this post


Link to post
  • 0

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>

 

 

 

Share this post


Link to post
  • 0

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>

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...