Skip Navigation

[Resolved] Visual Composer Intergation not working properly

This support ticket is created 6 years, 3 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.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 9 replies, has 2 voices.

Last updated by Nigel 6 years, 3 months ago.

Assisted by: Nigel.

Author
Posts
#597524

I am trying to: Make some kind of dynamic page layout and i am using Toolset and VisualComposer for that.

Everything works perfectly, until i am trying to use the custom VC modules from the theme. If i am trying to use that module it dosen't look like the regular page without the template. You have both pages here, the one which is using the Content Template and the regular one without the template.

Is it related to Views Integrations?

Link to a page where the issue can be seen: hidden link

I expected to see: hidden link

Instead, I got: hidden link

#597676

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Robert

Looking at the two pages, the correctly styled page includes the stylesheet ultimate.min.css from the Ultimate VC Add-ons plugin.

That stylesheet isn't enqueued on the problem page.

The difference between the two is that the first is a standard WP page, the second is a custom post type post.

Can you check if there are any settings for Ultimate VC Add-ons which specify whether they work with custom post types?

If not it may be reading the VC options. By default VC works on pages only, so you may need to enable it for other post types, too.

Depending on the version of VC you are using, you may find it under the Role Manager settings for post types.

#597765

It's not working a page also.

Here is the proof:

hidden link

And for some reason the Ultimate VC Add-ons Settings page won't work with our Network. Maybe because we are using a multisite network.

Is there any other way to enque the script manually?

#597782

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Yes, you can enqueue the CSS file manually, see https://developer.wordpress.org/themes/basics/including-css-javascript/ for what's involved.

You will be adding something like this to your theme's functions.php file:

function custom_enqueue_styles() {
 
  wp_enqueue_style( 'ultimate-style-min', home_url() . "/wp-content/plugins/Ultimate_VC_Addons/assets/min-css/ultimate.min.css", array(), false, 'all');
}
add_action( 'wp_enqueue_scripts', 'custom_enqueue_styles' );

Let me know if you run into any problems.

#597874

It works now, thank you Nigel.

#597900

I'm sorry, Nigel. I have to ask you something else. I just seen now that i got another problem.

Here are the pages:

Working one:
hidden link

Not working one:
hidden link

Please check the Heading Fonts and the "Prices" list.

#598023

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Robert

It looks like Ultimate VC Add-ons also loads a JavaScript file to do things like set font sizes, and that needs to be enqueued, too.

Try the following:

function custom_enqueue_styles() {
  
  wp_enqueue_style( 'ultimate-style-min', home_url() . '/wp-content/plugins/Ultimate_VC_Addons/assets/min-css/ultimate.min.css', array(), false, 'all' );

  wp_enqueue_script( 'ultimate-script-min', home_url() . '/wp-content/plugins/Ultimate_VC_Addons/assets/min-js/ultimate.min.js', array(), false, true );

}
add_action( 'wp_enqueue_scripts', 'custom_enqueue_styles' );

Note that I don't know what handle the script is enqueued with in the plugin file itself, I've guessed based upon the handle used for the CSS. It might not be a bad idea to scan through the plugin files to see where the JS file is enqueued so that you use the same handle (e.g. "ultimate-script-min") to avoid the script being enqueued twice on some pages.

#598026

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Robert

I just noticed our forum seems to be messing with the URLs in the code sample I gave. I've asked our server team to investigate, but in the meantime here is the code at pastebin: https://pastebin.com/DiRXkpkR

#598221

Hi Nigel,

The problem is still there even if i inserted that code in there.

BTW. how do you see which script is enqueued and which is not?

#598335

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screen Shot 2017-12-13 at 08.07.51.png

You can see which files have been added to the page by viewing the page source in your browser (i.e. reading through the HTML), or more easily by viewing the assets used on the page in the browser dev tools.

Each browser has slightly different tools, but in Chrome they look like the screenshot.

Note with the dev tools open the application tab shows the assets, and I can see that the ultimate.min.js script has been added to this page.

This is the page that you told me didn't work, but it looks like it is now to me...

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.