May 28, 2020 at 4:49 am #14775
How can I achieve this? I duplicated the single-post template and put blocks ocde in it but the template doesn’t appear in the post templates list…
Thnaks in advance.
May 28, 2020 at 2:55 pm #14777
Thanks for using our Hello! Pro 3 theme!
The reason you may not be seeing your new page template in the list is because the file naming structure matters greatly in WordPress. By naming your file single-post.php it will override only the default Single Post page templates, automatically, and you won’t see it in the list of template options.
In the latest version of Hello! Pro 3, we have all the page template files in the folder:
Also, you’ll want to use Block Templates for your desired outcome — adding the blocks code directly into the php page template file won’t work as expected, because the blocks are rendered in a different way.
Please see Bill Erickson’s great article on the subject:
Thanks and good luck using the Hello! Pro 3 theme!
May 29, 2020 at 4:08 am #14779
Thanks for your reply Alex !
What I try to do is to use for post the same look as for my pages. For pages I use the “Blocks” template where the page title is removed. So I can put an image directly below the header.
I duplicated the ‘single-post’ template, named it ‘new-single-post’ and added the relevant entry from the ‘blocks.php’ file:
remove_action( ‘genesis_entry_header’, ‘genesis_do_post_title’ );
But my template ‘new-single-post’ doesn’t appear in template box when editing the post…
Note that if I simply add the remove_action to the ‘single-post’ template, it doesn’t wwork either…
June 2, 2020 at 2:03 pm #14785
I see what you are trying to do now. Thank you for clarifying.
You’ll want to create your file single-post.php and put it in the root of the theme folder:
Inside your single-post.php, you would have:
<?php remove_action( 'genesis_entry_header', 'genesis_do_post_title' ); genesis();
This works when I test it on my local environment:
Thanks and good luck using Hello! Pro 3!
- You must be logged in to reply to this topic.