Source Theme Latest Posts Text

Can anyone please help with some code to change ‘LATEST POSTS’ text on the home page of the Source Theme to something else. :folded_hands:

You need to edit the theme files. Follow these steps.

  1. Download the source theme’s zip file.
  2. Unzip it and look for the file - home.hbs
  3. On line #12, update it to
    {{> "components/post-list" feed="home" postFeedStyle=@custom.post_feed_style showTitle=true title="NEW-TITLE" showSidebar=@custom.show_publication_info_sidebar}}
  4. You can update NEW-TITLE in the above line to the title of your choice.
  5. Save it and zip the contents of that folder. Name the zip file anything but source.zip
  6. Upload the new zip file as a new theme and activate it.
1 Like

Oh thank you … I have never before edited the hbs files, but this seems straight forward … will give it a go. Thank you. Gotta learn. Appreciate your time. Keep you posted when it works. :folded_hands:

1 Like

Reminder also that you will neeed to do this whenever a new version of the theme comes out, so make a mental note to check from time to time and keep a list of the things you need to readjust should an update come on the theme it will save you 6 months from now.

Thats why I was hoping for some script as opposed to editing hbs files.

Almost always gonna have to learn to live in the hbs files, the sooner the better if you want to make adjustments. eventually you’ll maybe even choose to just craft your own which will then be stable until you need to adjust something.

1 Like
<script>
  function updateContainerTitle() {
    const titleEl = document.querySelector('.home-template .gh-container-title');
    if (titleEl) {
      titleEl.innerHTML = 'NEW-TITLE';
    }
  }

  if (document.readyState === 'loading') {
    document.addEventListener('DOMContentLoaded', updateContainerTitle);
  } else {
    updateContainerTitle();
  }
</script>

Paste this in Site Footer script after changing NEW-TITLE. You will see a slight delay in the text change as it does it after DOM loads. A minor con as compared to directly changing the .hbs file.

1 Like

Oh thank you thank you thank you! Means a lot. Appreciate your time. :face_blowing_a_kiss:

2 Likes

I’ll get there, and it is on my radar. Just between a rock and a hard place with little time for now. I will be sure to dig in. Thanks for the prompt.

1 Like