[Resolved] Area editable with WP Bakery inside a template built with WP Bakery
This support ticket is created 2 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
I´m trying to do something but I don´t know if it´s possible:
I´ve set a CPT named "Centers", with several custom fields. The template that shows each "Center" is built with WP Bakery.
Now I would like that, apart from the custom fields, each "Center" could have an area to display other information and my goal is that this area´s contents could be organized through WP Bakery. Something like a wysiwyg field, but editable with WP Bakery.
I have "Enable WPBakery Page Builder for pages, posts and custom post types" ticked for "Centers" and other CPTs in WP Bakery´s "Role Manager" tab, and "Disable Gutenberg editor" in "General configuration".
I´ve been struggling with different options but I can´t find a way to embed an area editable with WP Bakery in the template for "Centers". The closest I´ve achieved is to put a Gutenberg block inside a WP Bakery row in the template. This block is editable from the front-end and back-end WP Bakery editor, but despite the content is updated, it does not show the update in the "Center" specific page, just the default sentence "Hello! This is the Gutenberg block you can edit directly from the WPBakery Page Builder."
Based on what I see here you have created your Centers template with the WPBakery Page Builder and you essentially want to create an area on that template to add additional info correct?
If so what will that additional information contain ? Information from your post itself ?
Yeah, you´re right. The "additional info" comes from the post itself, but I´d like this additional info to be displayed in a certain layout organized in the post form through WP Bakery.
Each Center shares a number of common information items, like name, telephone, address, zip code, city, featured image or description, and those are the custom fields. There are other contents that may differ from one Center to another, like certain services or informations that some Centers have and others lack. I could add custom fields for these as well, but it would limit the output to be displayed with the same layout for all posts, I´m afraid. That´s why I was thinking in some area in the template where I could have a "WP Bakery area" and organize with total freedom in rows and columns, the same way I can build a page or a template with WP Bakery, but in a "per post" basis.
I´ve attached 3 images that may explain this better. First and third is the "New Center" form, with the WP Bakery area. Second one is the Center page, that displays the custom fields but not the contents included in the WP Bakery area.
It would be best for you to make use of our Types shortcode to display the data.
If you use the WYSIWYG widget in WPB then you can simply add the following.
[types field='my-field'][/types]
Where my-field is the slug of the custom field that you want to display. This will allow you to dynamically pull the data from the custom field per post.
You mean adding the shortcodes to the content template for CPT "Centers"?
Yes, I know I can do that, and it´s done that way indeed for the custom fields that all Center posts have (title, address, telephone...).
Maybe I didn´t explain it right, but what I´m trying to achieve is to add additional information per post and organize that information in a per post basis, with the structure needed in each case (rows and columns, mainly), using a visual composer like WP Bakery or Blocks.
I could add a wysiwyg field as a new custom field and write rows and columns in code in HTML view for each Center post, but I was wondering if it could be done in an easier and faster way, with WP Bakery or Blocks.
What you are suggesting is a regular template made with WP Bakery. This would display all fields according to the layout built with the visual builder. But I´m talking about something different.
Think of an area in that template that would contain a custom field named "rectangle", similar to a wysiwyg field. And this custom field would be editable in the Center post edit form with WPB or Blocks. I know that Toolset Types has not a "Visual builder field" among its custom field options, but wondering if there is a workaround to achieve something similar.
WP Bakery has a block named "Gutenberg editor" which I can add to the template, but this is not editable in the Centers post edit form. Editing the post in the front-end WP Bakery editor does not allow to edit it, either.
Your additional information area won't be following a generic template but a defined template in your post itself.
In that case it may be best to either design that additional information section in the gutenburg editor of the post which will give you a visual builder, or just use a WYSIWYG field and arrange your custom fields in the order that you want and then just add that WYSIWYG field to your page.