I am trying to create my custom post type template. When i first created it, I started with a test model from the CPT. I’ve set up the conditions as below under theme styles. I saved, yet the template does not appear when I actually view the post. I had older versions, that apparently were being used instead. But even after deleting those and trying several times to save the needed template, it is failing to apply.
Please make changes to this system so assigning to post types is done in the template screen.
Please allow overriding/ replacing currently applied templates.
Please allow a save as option, so if there is multiple versions of something, that a designer can save into the currently applied template.
Please have some sort of indication as to where a template is being used. “CPT:{name}”, section, heading, unapplied, etc
FEATURE REQUEST: And if not currently possible, please consider adding an option to export the generated HTML and CSS as files that could be used on non wordpress sites, or manually edited as a theme file.
To the point of this issue, though, it looks like you have an individual bricks template assigned to your posts, and I suspect that is overriding your post-type template. Can you either remove the template assigned to one of those pages, render it with WordPress, and reload?
Furthermore…
Agree that template hierarchy needs attention here; it’s still a bit vague how template scoring works.
Although, I typically have the opposite problem @jcc5018 is having. Usually, I’ll have a global post-type template assigned, but then my one-off templates do not show; instead, the CPT template is shown.
how do i remove an individual template in exchange for the CPT template? When it temporarily worked, the template screen did say it was assigned to the proper CPT, but anytime i try to make an edit, I cant get it to save properly.
To test if this is an issue, just create a new page via WordPress and DO NOT edit with Bricks. Enter some content into the block editor, save, and see if your Bricks CPT template is used for presenting content.
yeah, ive done that, and no template at all was applied. So I’m not really sure what i need to do to apply. I have a feeling i need to go in the database and remove the trashed templates that i keep needing to replace since they arent saving the template.
I may be completely misunderstanding your report, but as far as I can see from your screenshots, the template for your custom post type does not have a condition.
You seem to have added a condition to the Theme Styles so that the Theme Style is applied to your custom post type “hobbies”.
However, your hobby template does not yet know where to display it. Open your Hobby Template, go to the Template Settings (not Theme Styles) and set your Condition there.
@timmse great suggestion there, but I wanted to ask since this same encounter is happening to me - what if even after setting a condition in the The Styles AND Template Settings, the template still won’t apply to the custom post type?
The post always returns a 404. I’m running out of ideas and was wondering if you got anything that can help? Thanks in advance!
404 Erros in combination with custom post types are most likely related to the permalinks. Go to Wordpress » Settings » Permalinks and re-save them by simply clicking save at the bottom and see if that fixes your issue.
Also, please check if the CPT slug isn’t already in use anywhere else (pages, posts, images, …).
same error here. Fresh site, just created the CPT, created an archive-template (working) and created a single template for the CPT → 404.
No saving of permalinks etc. is helping.
-Edit-
Just as a follow up: The error occurs if the CPT is hierarchical. If I uncheck it, the template works. As soon as it’s checked, the template throws a 404!
And another follow up (not as edit, so it maybe get’s seen better): The error only seems to appear on a site where the CPT is created with MetaBox.
On another site where it’s done via ACF, the template is working.
Hmm… unfortunately, I can’t reproduce the problem.
Would you be so kind as to send temporary login credentials and a link to this thread to help@bricksbuilder.io using the email address you used during the purchase?
Ok! I’m changing the title here to NO BUG because, apart from you, I’ve never received any feedback - so the problem seems to have already been solved for other users or is no longer relevant.
If your problem can be confirmed and reproduced, I will adjust it accordingly.
Strangely enough, on another site, where I just changed a CPT to hierarchical and made a test, everything is working fine.
I double checked my settings but they where the same than before.
Seems to be user error then
I have the same same problem. Archive and Single templates aren’t applied to my CPT’s (made with MetaBox), no matter if it is hierarchical or not, also saving permalinks structure doesn’t help at all.
It works in the builder and in the preview but when I want to visit acctual page i get 404
Please help