Single post template

Hi. I’d like to create a Single Post Template but not sure on how is working. I mean, if in this template I use the Post Content Element, then I need to write any post using the gutemberg editor? Or is it possible to apply this template to any post having the possibility to edit any post with Bricks builder? Not sure on how to do this.
Related question: How can I set up a featured image using bricks builder?

Thanx

Hi Aldo,

please check this two articles and videos first:

If you have any further questions, feel free to ask them here :slight_smile:

Greetings,
timmse

Hi @timmse , I’ve already read this articles and videos but those does not answer my questions. :frowning_face:

Ok.

If your post is written in Gutenberg, the Post Content Element shows that content. But you are still able to edit a single post with bricks and without Gutenberg. But then, you have to exclude those posts from your single posts template. Or you can insert two post content elements, one for Gutenberg Content, one for Bricks Content. If the Gutenberg Content is empty, it won’t show anything.

However, the best and recommended way is to write the posts in Gutenberg.

You cannot set a featured image in Bricks because the featured image is a WordPress feature. Bricks is able to use the featured image, but is not able to set it.

Best regards,
timmse

1 Like

But you could create custom Post types that include an image. So you could do everything in Bricks that way?

I don’t know exactly what you mean @alanj :roll_eyes:

Custom post types support featured images just like any other post type in WordPress. But in order for them to work as featured image, they need to be created in the WordPress post, not in Bricks.

Just don’t call it Featured image.

I just add an image field to the CPT. Remove the thumbnail from the Supports section ( I’m using metabox ) so the Featured Image box isn’t shown.
Then use a single template to display the CPT. It’ll have the image ( aka featured ), title and content just like a WP post but without using the horrible guttenberg.

To me it looks like a blog post and acts like a blog post, so close enough.

Well, yeah. But then it isn’t featured image in terms of what WordPress states as featured image.

You can use this approach and the custom
image in bricks… but if you ever change to another theme and won’t use custom fields anymore (or extend your new theme to support them), your post does not contain an image. Same goes for the content, if it’s built in bricks instead of directly in Wordpress.

True. But why would you ever want to change your theme?

Because the basic text element drives you up the wall… for example :joy:

Kidding. Requirements change, the theme you’ve been using is no longer being developed or updated, it doesn’t offer the functionality you need to relaunch your site… there are countless possibilities why you change at some point. We also notice that we have many users who previously used Oxygen, Divi, Elementor or a regular theme without a page builder.

@timmse
Why is it the recommended way to write posts in Gutenberg?
Why is it not possible to write blog posts with bricks builder and leave Gutenberg empty?

With Bricks I have so much more options to format the content and structure it.

Hi Joachim,
Nobody said that it is not possible to create your posts with Bricks. On the contrary, of course, it is possible.

To answer your first question, I’ll quote myself:

However, we still recommend creating posts in Gutenberg because it will make it much easier if you ever want to switch themes. Gutenberg posts are displayed with any theme. Posts created with Bricks (or any other page builder) can’t be displayed without extra effort and much database wrangling.

In principle, the same applies to pages as soon as you switch from one page builder to another. You are forced to rebuild everything - and you don’t have that problem if you use Gutenberg. This is not a problem for a handful of pages, but think about how much time this will cost you for hundreds of posts…

Best regards,
timmse

Hello @timmse ! What about this approach?

https://academy.bricksbuilder.io/article/gutenberg/

I am starting a brand new site with Bricks, and as @joachim.auster pointed out, being able to format posts with Bricks is really really tempting!

If I turn on the option “Save Bricks data as Gutenberg data” would I be able to create all my posts using Bricks and still be able to eventually migrate to another theme/builder without the need of recreate all my posts from scratch?

Would this option make my database clogged, overwhelmed? Or even compromising page speed somehow?

Best regards,
Shidartha

Hi Shidartha,
Welcome to the forum!

Yes, partly. If you use that option, simple Bricks elements such as text or images will also be saved in the Gutenberg content and, therefore also twice in the database. Of course, how this affects your database depends on the number of posts and content.

Long story short: basically you have all options and the freedom to choose the one that fits best for your project, as requirements vary.

1 Like

Hi,
i have done that and gutenberg data is displayed but bricks data is ignored.
I have done what is mentioned in Gutenberg – Bricks Academy but this seem to not work correctly or i am missing something.

If you use the standard templates, either one or the other is output - depending on whether you have selected “Render with Bricks” or “Render with WordPress” in the top bar. Or do I not understand your problem properly?