NO BUG: Default single template not overwritable

Bricks Version: 1.6.1
Browser: Brave newest
OS: macOS
URL: localhost

This is a huge bug: I just tried to add my first “single” template with condition set to post type post. I also tried “entire website”. But it is not working and it is very strange… It does not overwrite the default template from the theme – no matter what I try. I need this to work asap since I am not able to keep working on the theme. Tried to disable plugins – doesn’t work either.

Hi @Jonathan ,

Since it’s in your localhost, could you provide some screenshots of your template condition settings?

Does the single template publish?

Regards,
Jenn

Hi Jenn,

Here are two settings that I tried. Even when I choose “entire website” it keeps loading the default – But ONLY in the single post view, everywhere else the template loads.
If you can’t reproduce it, I could upload the site.
It is the only “single” template that exists. I also tried adding a new one – but no luck.


Bildschirmfoto 2023-01-06 um 10.44.01
Bildschirmfoto 2023-01-06 um 10.43.27

btw I even tried removing single.php from the bricks main template – but it then just loads index.php from the bricks theme directory instead of my template

Plus as I said I disabled ALL plugins and tried to switch to the bricks main theme instead of child theme – and still no luck

Might be obvious but… have you chosen “Single” for the template type?

CleanShot 2023-01-06 at 11.12.27

I am really sorry because unable to replicate it.
If you could upload it on a staging site, please send a temp admin login details to help@bricksbuilder.io together with this forum link.
I would be happy to help from there.

Nevertheless, @aslotta also raised a good point, please check if the template type is Single.

1 Like

yes it is single. I’ll upload the site to my server.

okay, I’ve sent you the credentials

Hi @Jonathan ,

Thanks for the credentials.
The root cause is because of your Archive template.

This is the template condition

When navigating to your single post, Bricks calculated that this archive template has the highest scores and tried to use this template to render in the front end.

At the same time, your Archive template is empty (no container no element at all

Bricks assumed that this template is not ready, and so fallback to default post template (single.php)

Once removed this post type condition in archive template, your single template is working as aspected now.

Regards,
Jenn

2 Likes

Thanks Jenn,

that’s a little bit confusing to me. Why is it called “archive” Template, if a single layout is allowed trying to use it and it is even prioritised? Maybe I just understood this wrong or maybe it would be something to improve for UX? Just an idea, through I learned and will be aware of this behaviour next time.

thanks and regards,
Jonathan

Also, I do not agree this is not a bug because on localhost strangely it does not work. I even deleted the archive AND removed it from trash and it still shows the default template. These are all my templates and I am pretty sure that “Single Blog Post” SHOULD be used. Also I am not able to populate the content with posts – just pages – even though I set post type to “posts”.

btw when I set the template type to “header” – it loads as expected

Hi Jonathan,

In the populate content section, you should be able to search your post after entering some text.

Regarding the single template not applying issue, can you check if your post is rendering with Bricks or WordPress on your local site?

1 Like

Ahh damn,

that was it :slight_smile:
thank you for your time – I learned a lot…

regards, Jonathan

1 Like

That was a very informative conversation and a nice fix, Thank You!

I am trying to put bricks on top of a theme we had installed before. It has assigned php template in the database - and those won’t render with a bricks template no matter the condition. What is the method for overriding that? I assume because if render with bricks setting - but I have thousands of pages like this. What is the db entry to change in bulk to set them to render with bricks?