Sitesao Support
  • Home
  • Themes
  • Plugins
  • Support

Support Forums

Home/Forums/Plugin & Extension/DHWCPage – WooCommerce Page Builder/Salient WP Bakery & DHWC Page Conflict

Salient WP Bakery & DHWC Page Conflict

This topic is: not resolved
  • April 10, 2024 at 6:32 pm #48719

    itmjustin
    Participant

    I noticed when updating to the latest version of Salient and DHWCPage, the backend wpbakery editor wasn’t fully loading options rows/columns/elements when editing or adding a product template. There appeared to be a number of js/css files that were missing. I was able to mostly resolve by incorporating this php snippet for when editing/adding a product template. The dynamic css generated by Salient/WpBakery when element changes are made (css based) still isn’t spitting out automatically, but I was able to just copy and paste the backend editor code into a page, then load it on the frontend and copy the dynamic inline css and paste it into a css file that is setup to load on any product. Worked for now. Below is the php snippet I had used to correct the backend visualization of editing again columns/rows/elements provided by wpbakery/salient.

    <?php
    
    function enqueue_dhwc_wpbakery_salient_assets($hook_suffix) {
        global $post_type;
    
        // Only enqueue scripts and styles on the DHWCPage edit screens
        if ('post-new.php' == $hook_suffix || ('post.php' == $hook_suffix && 'dhwc_template' == $post_type)) {
            
            // Define the URL path to the Salient Core plugin directory
            $asset_path = WP_PLUGIN_URL . '/salient-core/includes/admin/assets/';
            
            // Enqueue missing styles
            wp_enqueue_style('salient-grapick', $asset_path . 'css/grapick.css', array(), '2.0.7');
            wp_enqueue_style('salient-rangeslider', $asset_path . 'css/rangeslider.css', array(), '2.0.7');
            
            // Enqueue missing scripts
            wp_enqueue_script('salient-add-media', $asset_path . 'js/add-media.js', array('jquery'), '8.5.4', true);
            wp_enqueue_script('salient-grapick', $asset_path . 'js/grapick.js', array('jquery'), '2.0.7', true);
            wp_enqueue_script('salient-lottie', $asset_path . 'js/lottie-player.js', array('jquery'), '2.0.7', true);
            wp_enqueue_script('salient-multi-rangeslider', $asset_path . 'js/multi-rangeslider.js', array('jquery'), '2.0.7', true);
            wp_enqueue_script('salient-nectar-element-edit', $asset_path . 'js/nectar-element-edit.js', array('jquery'), '2.0.7', true);
            wp_enqueue_script('salient-rangeslider', $asset_path . 'js/rangeslider.js', array('jquery'), '2.0.7', true);
            wp_enqueue_script('salient-spectrum', $asset_path . 'js/spectrum.js', array('jquery'), '2.0.7', true);
            wp_enqueue_script('salient-wnumb', $asset_path . 'js/wnumb.js', array('jquery'), '2.0.7', true);
            
            // Enqueue any other scripts or styles that might be missing
            // ...
        }
    }
    add_action('admin_enqueue_scripts', 'enqueue_dhwc_wpbakery_salient_assets');
    

    Sorry, this forum is for verified users only. Please Login or Register to continue

Log In
Register Lost Password

Forums

  • Theme & Template
  • Plugin & Extension

Our Themes

Our Plugins

Tags

acf ajax Bug conditional logic css demo DHVC DHVC Form email Error footer form gallery Header Image Images layout login luxury mailchimp Menu mobile newsletter Newsri not working page plugin product product page recaptcha shortcode Sidebar Single Product Page spam Submit Submit button template translate Translation update Visual Composer woocommerce Woo Detail Product Page Builder woow WPML
© Copyright Sitesao.com - Support Policy