This topic is: not resolved
-
Hey there,
your plugin is very cool. It works good, except one other wpbakery plugin doesn’t work together with WooCommerce Page Builder.
I found the reason for this. Ultimate VC Addons checks the post_content and loads the styles and css conditionally.
function check_our_element_on_page($post_content) { // check for background $found_ultimate_backgrounds = false; if(stripos( $post_content, 'bg_type=')) { preg_match('/bg_type="(.*?)"/', $post_content, $output); if( $output[1] === 'bg_color' || $output[1] === 'grad' || $output[1] === 'image' || $output[1] === 'u_iframe' || $output[1] === 'video' ) { $found_ultimate_backgrounds = true; } } if( stripos( $post_content, '[ultimate_spacer') || stripos( $post_content, '[ult_buttons') || stripos( $post_content, '[ultimate_icon_list') || stripos( $post_content, '[just_icon') || stripos( $post_content, '[ult_animation_block') || stripos( $post_content, '[icon_counter') || stripos( $post_content, '[ultimate_google_map') || stripos( $post_content, '[icon_timeline') || stripos( $post_content, '[bsf-info-box') || stripos( $post_content, '[info_list') || stripos( $post_content, '[ultimate_info_table') || stripos( $post_content, '[interactive_banner_2') || stripos( $post_content, '[interactive_banner') || stripos( $post_content, '[ultimate_pricing') || stripos( $post_content, '[ultimate_icons') || stripos( $post_content, '[ultimate_heading') || stripos( $post_content, '[ultimate_carousel') || stripos( $post_content, '[ult_countdown') || stripos( $post_content, '[ultimate_info_banner') || stripos( $post_content, '[swatch_container') || stripos( $post_content, '[ult_ihover') || stripos( $post_content, '[ult_hotspot') || stripos( $post_content, '[ult_content_box') || stripos( $post_content, '[ultimate_ctation') || stripos( $post_content, '[stat_counter') || stripos( $post_content, '[ultimate_video_banner') || stripos( $post_content, '[ult_dualbutton') || stripos( $post_content, '[ult_createlink') || stripos( $post_content, '[ultimate_img_separator') || stripos( $post_content, '[ult_tab_element') || stripos( $post_content, '[ultimate_exp_section') || stripos( $post_content, '[info_circle') || stripos( $post_content, '[ultimate_modal') || stripos( $post_content, '[ult_sticky_section') || stripos( $post_content, '[ult_team') || stripos( $post_content, '[ultimate_fancytext') || stripos( $post_content, '[ult_range_slider') || $found_ultimate_backgrounds ) { return true; } else { return false; } }I would like to create a similar function with the template content. How do I get the template content of a product?
The post_content could be loaded with $post->post_content. How do I get the template code?
Best regards!