Code

Discussion on Templatera - Template Manager for WPBakery Page Builder

Discussion on Templatera - Template Manager for WPBakery Page Builder

Cart 11,759 sales

wpbakery supports this item

Supported

This author's response time can be up to 1 business day.

618 comments found.

bmkoko

bmkoko Purchased

I just purchase, did this work with the latest jscomposer? I see only export import from settings, any help resource?

Hello, Yes it works with the latest version of WPBakery Page Builder.
You can create/edit templates under: WPBakery Page Builder -> templates. The templates can be added using the templatera element, which can be found under: Add elements -> All.
You can check it’s tutorial here: https://kb.wpbakery.com/docs/add-ons/templatera/
If you face any issue/problem, then feel free to drop us a ticket via the customer center: https://support.wpbakery.com/ so that the support team can guide you further.



Knowledge Base · Official Support · Facebook · Twitter

Don’t forget to join our newsletter. Be first to get news and inside secrets from WPBakery team.

kford

kford Purchased

I noticed Templatera’s compatible with PHP 8.2.

Anyone know if we’re good with 8.3?

Hello, We have not encountered any issues while using it with PHP 8.3.
The support team will be glad to investigate it further if you face any issues.



Knowledge Base · Official Support · Facebook · Twitter

Don’t forget to join our newsletter. Be first to get news and inside secrets from WPBakery team.

Hello, I purchased Templatera directly from your website and version 2.3.0 is not available for download.

Hello, That’s quite strange. Please drop a ticket via the customer center: https://support.wpbakery.com/ so that the support team can share it with you.



Knowledge Base · Official Support · Facebook · Twitter

Don’t forget to join our newsletter. Be first to get news and inside secrets from WPBakery team.

With the latest changes to WPBakery, where the user has to select Default Layout or Blank Layout, if you have a default template set for a post type, it now doesn’t load, and you have to manually add the template. Are there any plans to address this?

Any update on when the issue is fixed?

It looks like this has been fixed in the WPBakery 8.2 release, as default templates are now loading as expected.

Hello, Yes, the issue has been fixed in the latest update of WPBakery Page Builder which is 8.2.



Knowledge Base · Official Support · Facebook · Twitter

Don’t forget to join our newsletter. Be first to get news and inside secrets from WPBakery team.

Is it possible that there are some compatibility issues with Templatera and wpbakery 7.6? The design options > css box settings are not taken to the page where the template is located. If I turn back to 7.5 it is ok again.

Hello, Yes, this issue has been identified as a bug and it is on our bug fix list.



Knowledge Base · Official Support · Facebook · Twitter

Don’t forget to join our newsletter. Be first to get news and inside secrets from WPBakery team.

Hi Rohan and the WPBakery Team,

I’ve modified the function outputShortcode in the file vc_template_manager.php so that post/page specific shortcodes now show the correct content based on the post or page id rather than the templates id. I’ve tested it with WPBakery shortcodes (Custom Headings, Single Image set to featured, and several post grids) and found no conflicts.

Here is the updatred outputShortcode function that allows page/post specific shortcode content to work in Templatera templates:

//revised outputShortcode

public function outputShortcode($atts, $content = ’’) { $id = ’’; $el_class = ’’; $output = ’’; extract(shortcode_atts(array( ‘el_class’ => ’’, ‘id’ => ’’, ), $atts)); if (empty($id)) { return $output; } $my_query = new WP_Query(array( ‘post_type’ => self::postType(), ‘p’ => (int)$id, )); WPBMap::addAllMappedShortcodes(); global $post; $backup = $post; while ($my_query->have_posts()) { $my_query->the_post(); if (get_the_ID() === (int)$id) { $output .= ‘ ’; ob_start(); visual_composer()->addFrontCss(); $content = get_the_content(); }

// Modify the content only if we're within vc_column shortcodes
        $content = preg_replace_callback('/(\[vc_column[^\]]\])(.?)(\[\/vc_column\])/s',
            function($matches) {
                global $wp_query, $post;
                $original_post = $post; // Save the original global post object
}
$post_id = $wp_query->post->ID; // the ID of the current post
            $post = get_post($post_id); // Set the global post object to the current post
            setup_postdata($post); // Setup post data for template tags
}
wp_reset_postdata();
$column_content = do_shortcode($matches[2]); // Process the content within the current post context
);
$post = $original_post; // Restore the original post object
    setup_postdata($original_post); // Setup postdata for original post
},
$content
return $matches[1] . $column_content . $matches[3]; // Return the modified content
print $content;
$output .= ob_get_clean();
$output .= ' ';
$output = do_shortcode($output);
$post = $backup;
wp_enqueue_style('templatera_inline', $this->assetUrl('css/front_style.css'), false, '2.1');
return $output;

Hi, Thanks for sharing. I will add it onto our list so that it can be tested further.



Knowledge Base · Official Support · Facebook · Twitter

Don’t forget to join our newsletter. Be first to get news and inside secrets from WPBakery team.

Hi, are there any plans to update the plugin soon?

Hello, The plugin will be updated as soon as any bug is identified within it. At present there is no bug with it’s functionality and compatibility with latest WordPress or WPBakery Page Builder plugin.



Knowledge Base · Official Support · Facebook · Twitter

Don’t forget to join our newsletter. Be first to get news and inside secrets from WPBakery team.

Can a templatera template be used to display in a sidebar widget? Looking at the comments you referred to a third party plugin that no longer exists. Surely there is a way to use a template in a Wordpress widget?

Hello, The templatera itself does not have a widget that can be used in widget area such as sidebar. It might be possible to achieve this by adding template shortcode from templatera in the widget. However, the page where the widget area is displayed needs to use WPBakery Page Builder.



Knowledge Base · Official Support · Facebook · Twitter

Don’t forget to join our newsletter. Be first to get news and inside secrets from WPBakery team.

First of all I want to apologize because I have no idea how to recreate the issue.

But I’ve seen it happen on a few sites before where the Templatera icon was missing even though the plugin was installed and you could add templates under WPB > Templatera, but the icon for inserting templates wouldn’t show up anywhere.

To fix, I had to go to WPB > Role Manager and I had to change the Administrators “Post types” setting from “Pages Only” to “Custom” and then select the post types and save. This fixes the issue and then switching back to “Pages Only” the issue remained fixed.

As an Adminstrator it seems like you should always have permissions for everything, so I’m not quite sure why the settings even exist.

Not sure if you’ve experience the issue before or how you would go about trouble-shooting it. But maybe if there was a “reset roles” button on the admin page that cleared everything back to a fresh install it would be very handy for troubleshooting, especially if it can also validate the admin roles on reset to ensure they are working otherwise spit out a warning.

Thank you for your time and consideration!

- AJ

Hello, The issue is quite strange. We have not encountered it. Please drop us a message via profile contact form if you come across it again, so that the support team can check it further.



Knowledge Base · Official Support · Facebook · Twitter

Don’t forget to join our newsletter. Be first to get news and inside secrets from WPBakery team.

Hello. Is this plugin actively maintained? I noticed that it hasn’t been updated since the 14th of October 2022 (almost a year ago)

Hello, Yes, the plugin is actively maintained and supported. We release updates when any bugs are identified.



Knowledge Base · Official Support · Facebook · Twitter

Don’t forget to join our newsletter. Be first to get news and inside secrets from WPBakery team.

Hello,

I have a pre-sale question.

After creating a re-usable component(block) or vc template. Is it possible to use this block on different pages with different content?

Thanks

Hello, Yes, the template that is created can be added to different pages using the templatera element.



Knowledge Base · Official Support · Facebook · Twitter

Don’t forget to join our newsletter. Be first to get news and inside secrets from WPBakery team.

I think you misunderstood my question, do I mean that the content of the element can be changed on any page or can it only be changed from the templatera element?

Thanks

Hello, The content of template can either be locked by adding it via templatera element in which case it will reflect the changes made to the original template onto the pages where it is added, or it can be edited on the page in which case it will not reflect the changes that are made to original template.



Knowledge Base · Official Support · Facebook · Twitter

Don’t forget to join our newsletter. Be first to get news and inside secrets from WPBakery team.

Hello, I bought the plugin but actually I cannot reflect the template changes on the other page / post or portfolio items. A few days ago I wrote a message on your support about this problem, but there seems to be no one to answer it. Could someone help me? Thanks!

Hello, Apologies for the delay in responding due to weekend. Please make sure that the template is added using templatera element. This will lock the template content and hence will reflect the changes made to it.



Knowledge Base · Official Support · Facebook · Twitter

Don’t forget to join our newsletter. Be first to get news and inside secrets from WPBakery team.

Looks like the plugin is loading a front_style.css file always, but the only code in there is code needed for the front-end editor:

body.compose-mode .vc-templatera .templatera_shortcode,
body.compose-mode .vc_templatera .templatera_shortcode {
    opacity: 0.5;
    filter: alpha(opacity=50);
}

Perhaps the script should only be loaded only if vc_is_inline() returns true to prevent unneeded scripts on the live site ;)

Also opacity works in all modern browsers (for a long time now), no need for the added filter property – https://caniuse.com/?search=opacity

- AJ

Hello, I have added these onto our list so that they can be checked in the future release.



Knowledge Base · Official Support · Facebook · Twitter

Don’t forget to join our newsletter. Be first to get news and inside secrets from WPBakery team.

I bought the templatera version but now it tells me that it is not compatible with the version of BACKERY that my website has. I have version 6.2.0. Is there a solution or previous version of the compatible plugin?

Hello, The 6.2 is a very old version of WPBakery Page Builder. We would recommend updating it to the latest version which is 6.10.0 to avoid any bugs and security issues.



Knowledge Base · Official Support · Facebook · Twitter

Don’t forget to join our newsletter. Be first to get news and inside secrets from WPBakery team.

Hello Team,

Pre-Purchase Query

I want to purchase this plugin can you please share the demo URL and Demo plugin, also is this plugin work on the bridge theme?

Best

Hello, Unfortunately we do not have a demo available for the plugin. However, we do have a 15 days refund tenure and can refund the purchase if you are not happy with it. The plugin works fine with any theme which is coded as per the WordPress theme development guidelines.



Knowledge Base · Official Support · Facebook · Twitter

Don’t forget to join our newsletter. Be first to get news and inside secrets from WPBakery team.

Hi, pre sale question: is it possible to create a template and use it via PHP code as a shortcode (with the do_shortcode() function)? Thanks

Hello, Yes, the template shortcode can be rendered via do_shortcode.



Knowledge Base · Official Support · Facebook · Twitter

Don’t forget to join our newsletter. Be first to get news and inside secrets from WPBakery team.

Hey

Templatera plugin is not compatible with Ultimate Addons plugin. For example, if we want to place template by do_shortcode [templatera id = “CUSTOM_ID”] in custom single post in source code, we get only html without working css and js libraries.

Here is workaround, you must put code manualy in functions.php and modify it dependent on Ultimate Addons modules used in custom page source code.

For example I used Content box and Info box modules, so here is ready code (for functions.php) for that worked in custom single post:

function add_custom_css_js(){
    // check if post is single and load libraries only here
    if( is_single() && get_post_type()=='post' ){
    // loading css files from Ultimate Addons modules
    wp_enqueue_style( 'ultimate-vc-addons-style', plugin_dir_url('') . 'Ultimate_VC_Addons/assets/min-css/style.min.css');
    wp_enqueue_style( 'ultimate-vc-addons_content_box_css', plugin_dir_url('') . 'Ultimate_VC_Addons/assets/assets/min-css/style.min.css');
    wp_enqueue_style( 'ultimate-vc-addons-animate', plugin_dir_url('') . 'Ultimate_VC_Addons/assets/min-css/animate.min.css');
    wp_enqueue_style( 'ultimate-vc-addons-info-box-style', plugin_dir_url('') . 'Ultimate_VC_Addons/assets/min-css/info-box.min.css');
    // loading js files from Ultimate Addons modules
    wp_enqueue_script( 'ultimate-vc-addons-params', plugin_dir_url('') . 'Ultimate_VC_Addons/assets/min-js/ultimate-params.min.js', array(), '', true );
    wp_enqueue_script( 'ultimate-vc-addons-appear', plugin_dir_url('') . 'Ultimate_VC_Addons/assets/min-js/jquery-appear.min.js', array(), '', true );
    wp_enqueue_script( 'ultimate-vc-addons-custom', plugin_dir_url('') . 'Ultimate_VC_Addons/assets/min-js/custom.min.js', array(), '', true );
    wp_enqueue_script( 'ultimate-vc-addons_content_box_js', plugin_dir_url('') . 'Ultimate_VC_Addons/assets/min-js/content-box.min.js', array(), '', true );
    wp_enqueue_script( 'ultimate-vc-addons-info_box_js', plugin_dir_url('') . 'Ultimate_VC_Addons/assets/min-js/info-box.min.js', array(), '', true );
    }
}
add_action('wp_enqueue_scripts', 'add_custom_css_js');

Hello. Ultimate Addons support helped me to solve the problem.You need to go to the debug mode plugin options (Ultimate Addons) and switch on “load scripts globally”. After that all is work correctly.

Release Notes and Changlog for both Templatera and WP Bakery have not been updated, can you please get those updated so that we may see what has been changed prior to updating? Thanks.

Hello, The changelog of WPBakery Page Builder is as follows:
Changelog: 
13.10.2022 - ver 6.10.0 3
• New: Option to use Google Fonts locally - used fonts will be downloaded to comply with the GDPR policies
• Compatibility: Compatibility for WooCommerce Tab Manager
• Update: Pie chart legend positions improved
• Update: Translations updated
• Fix: Full-width logic for rows is working properly
• Fix: Frontend editor does not contain unneeded notices
• Fix: Controls work properly in the Frontend editor
• Fix: WooCommerce Post Grid works properly with translate keys
• Fix: Flexslider overflow in the image gallery works properly
• Fix: Round chard legend position works properly
• Fix: WooCommerce Shop page CSS works properly
• Fix: Unused CSS prefixes removed
• Fix: addPageCustomCss and custom ID work properly
• Fix: Custom accent colors work properly in the Separator with Text
• Fix: Youtube Video background autoplay works properly
• Fix: License check logic works properly
• Fix: Edit form loading for async scripts
• Fix: Warning on the removed default template
• Fix: Automapper removing elements work properly
• Fix: get_the_excerpt filter arguments support WordPress 5.5
• Fix: Admin access in multisite works properly
• Fix: Edit-form initialization works properly
For templatera:
 - Update: Template rendering scope now is rendered page scope
  - Fix: Advanced Custom Fields now is properly displayed on the page

This will be updated soon.

Hey,

This is a suggestion for the dev team since I don’t have access to the Github repo to suggest a pull request…

Currently the templatera shortcode creates a new WP_Query when rendering the shortcode which can cause issues if you have any elements inside the template that reference the global post. For example if you have a custom field shortcode inside templatera it’s going to try and get the custom field of the template and not the current post.

There is also no need for a new WP_Query to render a template. I would recommend modifying the shortcode to instead use something more simple like this:

extract( shortcode_atts( array(
    'el_class' => '',
    'id' => '',
), $atts ) );
if ( empty( $id ) || 'templatera' !== get_post_type( $id ) ) {
    return $output;
}
$content = get_post_field( 'post_content', $id );
if ( ! $content ) {
    return;
}
$output = '';
ob_start();
    visual_composer()->addPageCustomCss( $id );
    visual_composer()->addShortcodesCustomCss( $id );
$output .= ob_get_clean();
$output .= do_shortcode( $content );
return $output;

Which won’t pollute the global $post it’s also much cleaner and simpler ;)

Thanks!!

- AJ

Hi, Thanks for sharing. I have added this onto our backlog so that it can be checked further during an update.



Knowledge Base · Official Support · Facebook · Twitter

Don’t forget to join our newsletter. Be first to get news and inside secrets from WPBakery team.

Great idea for a plugin, shame it does not work with “Ultimate Addons for WPBakery Page Builder” properly.

Mainly the “Headings” shordcode when set to use page or post title. It still displays template name on pages using the template.

Hello, We are not exactly sure of how the headings work as it is a custom element of the addon. However, to display post-related data the element code will have to be modified to check for posts instead of template in which it is added.



Knowledge Base · Official Support · Facebook · Twitter

Don’t forget to join our newsletter. Be first to get news and inside secrets from WPBakery team.

by
by
by
by
by
by

Tell us what you think!

We'd like to ask you a few questions to help improve CodeCanyon.

Sure, take me to the survey