Custom post.hbs

is it possible to create a single post template for styling a specific tag?

styling a specific tag

Yep:

create a file called tag-{slug}.hbs and that will take precedence

Sorry, Iā€™m confused. Isnā€™t that the tag listing page?
What Iā€™m trying to do is have a separate single post page for a particular tag.

Say if I have a tag called quotes, and I click into the single post view. I want it to display only the content of the post, not the title or the meta data.

I know you can do post{slug}.hbs on a post by post basis, but I want to do it on a tag tag basis. Something like post{tag}.hbs

I donā€™t follow on what youā€™re trying to do?

Go to /tag/quotes -> It displays only post content rather than post meta for every post?

I think that @MayanMisfit wants something like this. All posts that have a certain tag to automatically get a post template. For example:

collections:
  /news/:
    permalink: /news/{slug}/
    filter: news
    template: news

The template for /news/ is news.hbs. But all posts will get post.hbs as template. So he wants to get post-news.hbs for all these posts.

Not sure there is a way to set but I might be wrong. I can only think of using {{#has tag="news"}} inside post.hbs and load from partials a custom structure.

Yes, thatā€™s pretty much it. Could I put like 95% of the post.hbs in to a partial? Well all the styled elements at least? So Iā€™d have a partial called ā€˜postsā€™ and one called ā€˜notesā€™

Ok this is sorted now, I was being dense

If I am understanding this correctly:

Is it possible to have all posts with a specific tag to have a different layout?

In my case, I have podcasts in posts. So I create a post and assign the tag ā€œpodcastsā€. Then that post has a title, short introduction and then an embedded podcast link from anchor.fm.

I donā€™t want to assign post images because I donā€™t like the big header image for podcast posts. I want to make it smaller and adjust it somewhat.

Hi,

Have you tried custom post?
https://ghost.org/tutorials/custom-page-templates/

youā€™d create a custom-podcast.hbs and you can assign it to your podcast posts

1 Like