Skip Navigation

[Resolved] Plugin Conflict breaking Layouts Cell Module editor modal

This thread is resolved. Here is a description of the problem and solution.

Problem:
Using an e-commerce plugin called MarketPress, and they use the same "Colorbox" css styles as Layouts. With both installed, MarketPress is overwriting/adding to the css of Layouts in the back end, and it is breaking the Layouts Cell Module modal.

Solution:
If you have MarketPress installed, and you have Layouts installed, you'll need to put this in your theme’s functions.php file:

/*===== Fix Colorbox Issue in Layouts =====*/
 
function load_custom_wp_admin_style($hook) {
  if($hook == 'toolset_page_dd_layouts_edit') {
    wp_dequeue_style( 'colorbox', plugins_url( 'includes/admin/ui/colorbox/colorbox.css', __FILE__ ) );
    wp_dequeue_style( 'mp-admin', plugins_url( 'includes/admin/ui/css/admin.css', __FILE__ ) );
  }
}
add_action( 'init', 'wp_defined_new_scripts');
 
function wp_defined_new_scripts() {
  add_action( 'admin_enqueue_scripts', 'load_custom_wp_admin_style' );
}
This support ticket is created 7 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
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 1 reply, has 1 voice.

Last updated by MichaelR9215 7 years, 3 months ago.

Assisted by: Noman.

Author
Posts
#555513
layouts-conflict.JPG

Hello,

I am using an e-commerce plugin called MarketPress, and they use the same "Colorbox" css styles as Layouts. With both installed, MarketPress is overwriting/adding to the css of Layouts in the back end, and it is breaking the Layouts Cell Module modal (see attached).

I recall having a similar issue with WordFence, and we got it fixed.

Is there an easy way to make sure Layouts css is not overwritten?

Please advise.

Thanks!

#555538

Hello,

Just so I put a solution here ...

If you have MarketPress installed, and you have Layouts installed, you'll need to put this in your functions file:


/*===== Fix Colorbox Issue in Layouts =====*/

function load_custom_wp_admin_style($hook) {
  if($hook == 'toolset_page_dd_layouts_edit') {
    wp_dequeue_style( 'colorbox', plugins_url( 'includes/admin/ui/colorbox/colorbox.css', __FILE__ ) );
    wp_dequeue_style( 'mp-admin', plugins_url( 'includes/admin/ui/css/admin.css', __FILE__ ) );
  }
}
add_action( 'init', 'wp_defined_new_scripts');

function wp_defined_new_scripts() {
  add_action( 'admin_enqueue_scripts', 'load_custom_wp_admin_style' );
}

Thanks!