Dear all,
I have created custom post types named "Offers of the day" (English: offers of the day) along with custom fields and content template in WPBakery Page Builder editor. After adding a new offer of the day, filling in the custom fields and publishing the new post, the following problems occur:
1) the entry appears not as a full-width page, but a boxed page (not even 1170 px);
2) the post meta data is displayed at the top of the page, which cannot be hidden.
An example is available here: hidden link
I assume the problem is with the configuration of the single.php file from my theme, but I have not had such problems before. I have tried different Bootstrap loading settings inside Toolset, but this does not solve the problem.
I have not found a solution to the problem on your forum, so please help me. I would be happy to share my site and/or FTP login information.
Thanks in advance!
Hi there,
It seems that the layout is the default layout of your theme when used as a normal blog post.
This shows maybe The Content template is not assigned to that post type?
Please go to WordPress Dashboard > Toolset > Dashboard and see if the section for the single column has a content template there?
I'd appreciate it if you could give me the URL/User/Pass of your WordPress dashboard after you make sure that you have a backup of your website.
It is absolutely important that you give us a guarantee that you have a backup so if something happens you will have a point of restore.
Make sure you set the next reply as private.
Hi there,
Thank you for the information. I checked and found out that your theme overrides the layout from Toolset and Toolset has no control over the layout, unfortunately.
If you check a normal post you will see that the same boxed layout is used:
hidden link
You need to create a file called single-oferta-dnia-2.php and add the same code of the theme that is used for pages.
The best way to go forward is to ask your theme developer about this. Ask the following:
I created a post type with the slug of "single-oferta-dnia-2". How can I create a template that will be a full width for it?
You do not need to touch the Toolset content template. As soon as you create the proper file on your theme, the content portion inside the file will use the Toolset content template.
Thanks.
Unfortunately, the theme's support disclaims responsibility for this error, and I am unable to find an answer as to which specific files are linked together inside this theme.
Here is the response from support that I received:
“By default, CPT posts use the single post template. However, you can use CSS to make your CPT posts full width and hide the post meta section. While I'd love to assist you with the CSS, Envato's policy prevents us from supporting customization requests. I wish I could help, but unfortunately, it's not possible."
I tried to create a "single-oferta-dnia-2" file according to your advice, however, further in the code, “<div class=”container“>” is added, which makes the page boxed and not full width.
It seems to me that the best idea, which will be a solution for all WPBakery Page Builder based themes, would be to create a code that makes it so that for all CPTs where WPBakery Page Builder is used, the WPBakery template is used, not the single.php post template or the page.php template.
Are you able to help me with this issue? As I mentioned, this would also be a solution for any other developer who is in a similar situation to me, regardless of the theme he/she uses.
Hi there,
Unfortunately, that is not what Toolset can do as WordPress prioritizes the Theme and the content template is available only inside the CONTENT section.
What I have found is that the custom post in question generated a unique CSS class on the BODY HTML tag.
So a CSS code like this will make it full with without needing to touch anything:
@media screen and (min-width: 1200px) {
body.single-oferta-dnia-2 .container {
width: 100%;
}
}
You can add "body.single-oferta-dnia-2 " to the beginning of any CSS selector and it will limit the CSS to that post type.
Hope I could be of help.