Episode theme as landing page?

If I have no posts on my site will the Episode theme, will the theme still place the text “latest episodes” on the front page by default, or will it go away? In all it would be a nice landing page for a podcast but since the pod is hosted elsewhere it’s a bit “clonky” to make posts to fit the episodes.

It would still show that title:

You could simply delete that section, if you’re absolutely sure you don’t want it there, and re-upload the theme

I can’t edit the theme, I am on the lowest tier and since I cannot provide the .txt file for google ads, and what is seems also not this thing (highly appreciate your input) unless upgrading I am sensing I will quit my Ghost subscription that is due early January.

Feels more economical to set up a Wordpress landing site for my Podcast, which is hosted elsewhere, and use i.e. (horror) Substack for free for a newsletter or go Mailchimp.

Got it!

If you can’t edit the theme, just add this to the code injection:

<script>
  document.querySelector(".gh-archive-header").style.display = "none";
</script>

:smiley:
Where should that be placed? Tried header, and footer and nothing changed :frowning:

Well, guess who just typed too fast :smiley:

<script>
  document.addEventListener("DOMContentLoaded", function() {
    document.querySelector(".gh-archive-header").style.display = "none";
  });
</script>

This is the correct one – basically just adding an event listener in the beginning to make sure the title we want to remove has actually been fully loaded :smiley:

Tested it on a local Ghost install with the Episode theme, so should also work on Ghost(Pro) :slight_smile:

That works! Can I also get rid of the text in the bottom saying all episodes? I still have episodes up and would want that gone

1 Like

That link comes from the secondary navigation, as far as I can tell. So, no need for any code injection. Just head over to Settings → Navigation :slight_smile:

There is nothing in the second navigation, so not there :frowning:

Hm, I can’t replicate that.

When I delete everything in the secondary navigation, I get an empty footer:

When I add a link there, it shows up:

Do you have a live site where we could have a look, by any chance?

This is above the subscribe section and belongs to the latest posts. I still have the posts cause I really liked how it came out removing the text.

This is what I can get out in regards to source code for those final elements or what one would call them:

Subscribe to our Newsletter

jamie@example.com Subscribe

If all that was removable using a script it would be great :innocent:

Ahhhh got it! Sorry for the confusion :sweat_smile:

<script>
  document.addEventListener("DOMContentLoaded", function() {
    document.querySelector(".gh-archive-header").style.display = "none";

    const moreElement = document.querySelector(".gh-more");
    if (moreElement) {
      moreElement.style.display = "none";
    }
  });
</script>

I wrapped the “more element” into an if-logic, since that is only visible when you have more than one page (which is why I didn’t see it on my local instance at first).

1 Like

You seem to be a genius :raised_hands:t2::star_struck::pray:t2:

1 Like

Is it also possible to remove the search from the frontpage?

If it’s just about the search button in the top navigation, you can add this to your existing code injection (before the closing </script> tag):

    document.querySelector(".gh-search").style.display = "none";

Don’t get that to work

We’re running into all the “gotchas” here :joy:

Here’s the code that works – turns out, there were two elements with .gh-search, so we need to hide them all:

<script>
  document.addEventListener("DOMContentLoaded", function() {
    document.querySelector(".gh-archive-header").style.display = "none";
      
    const searchElements = document.querySelectorAll(".gh-search");
    searchElements.forEach(function(element) {
      element.style.display = "none";
    });
      
    const moreElement = document.querySelector(".gh-more");
    if (moreElement) {
      moreElement.style.display = "none";
    }
  });
</script>
1 Like

top, works like a charm, happy podcaster :)

1 Like