Ghost Version: 2.31.0
Configuration: Local install
I’m trying to display a list of posts with a certain internal tag (ex: #projects) on my home.hbs page. For each post, I want to also display the additional tags on that post (ex: Food, Science, etc.). For some reason, the tags don’t display in the below example:
filter="tags:project" should be filter="tag:hash-project" - From what I know, when using tags (plural), you need to pass grouping (), but not for tag (not plural). Also, since you’re trying to filter with the internal tag, you need the hash- prefix
Removing the get helper will loop over the home page posts which is why tags are displayed
If you want to also fetch post tags, you need to use include=tags in the get helper
Instead of using the get helper, you can also use Dynamic Routing (just FYI )
Thank you very much! The “include=tags” fixed my problem in the above example. I totally missed this in the documentation - thanks for linking the source.
Oddly enough, this ( filter="tags:project" ) actually worked for me to filter out #project tagged posts. I didn’t need the array or the “hash-” in the front.
Out of curiosity, why are the tags and authors attributes treated differently than other post-related attributes? I looked through here (Ghost Handlebars Theme Helpers: get) under “include”, but that wasn’t really clear to me.