Custom post template - Inconsistent documentation and not working if implemented
See original GitHub issueIssue Summary
This section of documentation states that Ghost supports custom post templates if you create a post-{{slug}}.hbs
theme file:
http://themes.ghost.org/docs/templates
However, this same page then refers you to this link for more information: post-context
This page states:
The post context always uses the
post.hbs
template. This template is required in all Ghost themes. At present there is no support for custom post templates as there is for pages.
So I’m confused as to whether this is currently supported or not?
Steps to Reproduce
- I currently have a post titled “Test” with a post-slug of
test
. - I adapted
post.hbs
to include a couple of extra scripts in the page - I published the page
When I inspect the html for the page, it is clear that the default post template is still being used. info e.g. Why do you consider this to be a bug? What did you expect to happen instead?
Issue Analytics
- State:
- Created 7 years ago
- Comments:15 (7 by maintainers)
Top Results From Across the Web
My template for custom post type is not working - WordPress.org
Hello. I am trying to create a custom template for custom post type. My custom post type is teams. I have changed the...
Read more >wordpress custom post template not working - Stack Overflow
1 Answer 1 ... Simply technologies.php by itself is not enough for WordPress to recognize automatically. You need to rename the theme file...
Read more >How to Create a WordPress Single Post Template - Elementor
Create your own WordPress single post template from scratch, no coding skills needed! In this tutorial, we will show how you can design...
Read more >Content template not applied to the post - Toolset
Solution: It turns out that the user's theme does not have a proper template to display single posts(single.php or single-{cpt-slug}.
Read more >Template Design and Analysis: Integrating Informatics ... - NCBI
Standardized template design is a useful tool to improve clinical documentation and reliable reporting of health care outcomes when constructed with clear ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This feature doesn’t need the Public API to be enabled and it does work in both 0.11.4 and the latest master. I’ve tested out both just now.
You do need to restart Ghost when adding new templates via the file system though - not sure if that’s what’s tripping folks up here.
In the root folder. Please double check that you are editing the correct theme.
Please open a forum topic to get further help. We can re-open this issue if there is a bug in Ghost.