-
Valerrr
Hello, I would like to ask you a few questions about Block Element – Content Template.
1. Can I use Dynamic Content (block element) purely with GeneratePress PRO without GenerateBlocks? In other words, does this feature work independently of GenerateBlocks?
Dynamic Content = https://imgur.com/a/QPsUJIi
2. I am now trying to create everything in REM units. Is it a good idea to insert Dynamic Content into a container for which I set the Max Width to 50 rem (800px)? Or is it better to choose PX?
Image = https://imgur.com/a/2mSoIhq
3. Is there anything I should avoid when creating a Content template?
4. Why did my hooks stop working after the new Content Template was released? For example, after_entry_content no longer displays content.
Thank you very much.
-
George
Hi there.
1. The dynamic content block block is part of GeneratePress Premium plugin and can be used without GenerateBlocks (or Pro)
2. Yes, using REM for the max-width is valid.
3. Just make sure, you assign it to the proper place in the Display Rules. For example, to make a single post content template, the template’s location should be set to Post->All Posts.

4. When you create a Content Template in GeneratePress Elements, it fundamentally changes how the content area is rendered, which affects how hooks work. Try using the
after_main_contenthook to inject content after the main post content. -
Valerrr
Hello, I have one more question about Content Template.
Does it only work flawlessly with GenerateBlocks?
Why am I asking?
I created a HERO section using the GreenShift plugin. I noticed that all generated <style> tags are rendered directly in the HTML body (near the blocks) instead of being placed in the <head> section.
When I insert this section into a normal page, everything works fine. The problem only occurs when using the Content template.
Question
If I want everything to work flawlessly, do I have to use GenerateBlocks, or can the problem in GreenShift be solved somehow?
-
George
A content template is functionality of GeneratePress premium plugin, so need for GenerateBlocks. GenerateBlocks is recommended as a block solution for site building but you can use any other block plugin or just use core Gutenberg.
I am not familiar with the GreenShift plugin so I am not sure how this was constructed. You can use GenerateBlocks to construct the hero section inside a GeneratePress element with Page Hero as content type, then set conditions on where this hero would appear.

A content template is a different element type. We usually use these for Single Posts / Singular templates ( this also includes things like 404 and No Results pages )
- You must be logged in to reply to this topic.