Archived topic
after_entry_content hook not work
8 replies · Started by Angel on October 23, 2022
I create one Conteny Template Block for my single post, but after that, the hook: after_content and after_entry_content all don't work;
I create a Author Box using after_entry_content, but the single post not show this Author Box(it can be show if I use the hook: after_do_template_part)
so I want to know why after_content and after_entry_content not working
Hi there,
What is a Conteny Template Block?
Let me know :)
sorry it's element, type is: Content Template
Hi Angel,
If you're creating an Author Box, just set the Element Type to hook. In general, Content Templates are used to style how posts appear in Archive/Blog Pages.
Here's a sample video you may refer to: https://www.youtube.com/watch?v=HMhUo91RjsE
yes, the Author Box is element type Hoook(hook is after_content and after_entry_content), I did it right, but this Ahthor Box not show in Single Post(the single post is control by element, type is: Content Template)
I see. Out of curiosity, may we know why you're using a Content Template for your Single Posts? Can you share a link to a single post in your site?
I add it in private information
this is my screenshot
I see. You shouldn't need a Block Element - Content Template for such a design.
The only thing you should need is a Block Element - Page Hero for the Title section. Reference: https://docs.generatepress.com/article/block-element-page-hero/
I you disable the Block Element - Content Template and use a Page Hero instead, the Author Box you created should work.