I want to create a page template that is used for all pages on my website except the homepage. For simplification let´s say this page template’s only purpose is to display the page title.
I have created this template and then set the display condition to post-types → pages.
Next I create a new page in Bricks. The template does not show by default so I assume I have to insert the template from the template library to the new page, right?
I do insert the page template manually into the new page. I do add an image or some text and save the page (which is published). I go to ‘preview’ and the page template content including my added content shows (that is what I want).
Then I view the page on the Wordpress frontend and I see ONLY the template content without my added content. All things I add to the page show in ‘preview’ but not on the Wordpress frontend.
What am I doing wrong? Or is this a bug?
What I also notice is that on the page where I have added the single page template I can change all template content like it would be ‘normal’ page content. Usually Bricks would display a red frame around a template and says something like ‘edit content’ if I want to edit a template part. Not in this case. All template content has a blue frame and is editable.
How do you conclude that it works? On the frontend your text ‘hgfhgfh’ is missing. That is what I also experience. Any content added to the page is not showing on the frontend.
Thank you for your help so far. No I have not added a post content element because after adding the page template to the page in Bricks Builder I add some content to the page using Bricks Builder.
But all the content I add to that page is only showing in Bricks Builder page preview NOT on the Wordpress frontend. That is why I suspect a bug here.
I hope this clarifies the issue. Let me know if you need any more info.
Because a page template is not a page. These are different entities.
If you need to create a page in Bricks, then edit the page in Bricks and do not need to create a template for it!!!
I suspect that you don’t understand how to work with bricks at all. Therefore, I do not see an error here and do not understand the train of thought.
Well, it may be an understanding issue on my site. But let me ask a question then:
How would you address the following problem:
All pages of the website should show a page title
Half a year later you decide that you no longer want the page title.
Without a page template you now need to change EVERY page for example 50 pages you need to touch.
How do you work with Bricks to just change the page title in ONE place? Isn´t that what a page template is for? My train of thought is that I would simply remove the page title in the page template and on all pages that use this template the page title would be gone. Is that thought false?
If I understood you correctly, you’d like to create a “fixed” layout for all your pages and then edit each page’s content individually, correct?
There are 2 ways you could go about this:
1- If the difference between these pages is very minimal (e.g. just the title and some data from custom fields using ACF) then you can just do it the way you’re doing it now with a “post title” element & other dynamic data tags. The values for these would change dynamically depending on the page. That’s why the “Post title” element shows “Default-Page-Template” on the single page template, since that’s the title of that template. The value changes dynamically to reflect the post’s post title.
2- If you only want to have a few common elements/layout parts on a page (not the whole page), you can consider using “Section” templates instead of having a “Single” template for all pages. This is especially useful if your pages differ greatly from each other. You can then insert that template in individual pages using the “Template” element.
The first approach is usually best for posts or other CPTs. The second approach is generally better when working with pages. Remember that the “Single” template basically overrides everything you build with Bricks on that page, and your only way of retrieving that content would be through the “Post Content” element.
In both approaches, you can have a “Post title” element that you can design in one place and see the changes reflected across all instances of that template.
Let me know if anything I said doesn’t make sense and I’m happy to explain further!
Hi @charaf,
thank you very much for your response. What you describe under section 1 is what I intended to do but my experience is that all content that I add with the Bricks Builder on a page using that template does not show on the frontend - I only see the template content.
Under section 2 you write that a single page template overwrites everything I design with Bricks on that page. This means I can not have a page template that pulls in some dynamic data like the page title and then design the rest of the page with Bricks right? I have to use a section template then for all my pages instead. Did I get this right?
You can ceratinly use a single page template to achieve what you’re trying to do (pull in dynamic data & display it).
However, as @clickfusion63 mentioned maybe you’re previewing the template itself and not actual page? If you want to preview how the changes might look like on a page while working on the template itself, you can “populate” the template with a specific page in the builder: