Style not sticking with MT plugin deactivated

This topic contains 5 replies, has 2 voices, and was last updated by  Sebastian 4 years, 6 months ago.

Author Posts

bluedognz

Hey Seb

This video explains my issues: http://drops.bluedogwebdesign.com/3O0b030v2J33

Thanks!


Sebastian

Hey Clark,

I wonder if this might be due to your Breeze minification plugin. Do you need to clear the cache after making changes in Microthemer? Or perhaps clear your browser cache (if the plugin enables browser caching too)? I ask because when I view the page shown in your video, the headings do reduce in size on smaller screens.

Breeze combines Microthemer’s active-styles.css file into the following when I access your site: https://www.bebrilliantnow.com/wp-content/cache/breeze-minification/css/breeze_5b50adda637ffa94311a5b86e4e1f0ce.css

The reason this caching issue isn’t a problem when working directly in the MT interface is because MT forces a non-cached version of active-styles.css to load every time you make a style change (by appending the time in seconds), so that style change is reflected on screen.

I’d be happy to troubleshoot this if the above advice doesn’t help and you can send access details via our secure contact form.

Thanks,
Sebastian


bluedognz

Thanks Sebastian

Apologies, I think I caused some confusion by enabling the MT plugin, so thats why you were seeing the headings reduce on smaller screens.

I tested the issue with breeze disabled, and the big still exists.

I’ve sent you admin credentials for the site via your contact form, feel free to temporarily disable plugins to troubleshoot. 🙂

Clark


Sebastian

Thanks for providing access Clark.

Microthemer’s inactive code could queue the stylesheet in a different order of priority than when Microthemer is active. This could lead to inconsistent results due to CSS source order rules. I will roll out a fix for this later today.

Cheers,
Sebastian


bluedognz

Hi Sebastian

Just wondering if this fix is coming soon, I just wanted to make sure I have the correct inactive code, as I have quite q few sites to update.

Thanks
Clark


Sebastian

Hey Clark,

You do have the correct ‘inactive’ code for your functions.php file. It will be added to MT early next week, I just got carried away with a new feature that I was expecting to take a day or two max, but the scope of it grew – recent and theme-sampled styles in the dropdown menus.

Here it is again for anyone else wanting the code in the meantime:

/* Begin Microthemer Code */
if (!defined('MT_IS_ACTIVE')) {
	function add_microthemer_css() {
		$p = get_option('preferences_themer_loader');
		$mtv = '?mtv=' . (!empty($p['version']) ? $p['version'] : 1);
		$mts = '?mts=' . (!empty($p['num_saves']) ? $p['num_saves'] : 0);
		if (!empty($p['g_fonts_used'])){
			$p['g_url'] = !empty($p['gfont_subset']) ? $p['g_url'] . $p['gfont_subset'] : $p['g_url'];
			$h = 'microthemer_g_font'; wp_register_style($h, $p['g_url'], false); wp_enqueue_style($h);
		}
		$r = content_url() . '/micro-themes/'; $css_min = !empty($p['minify_css']) ? 'min.' : '';
		$h = 'microthemer'; wp_register_style($h, $r.$css_min.'active-styles.css'.$mts); wp_enqueue_style($h);
		global $is_IE; if ($is_IE) {
			global $wp_styles; foreach ($p['ie_css']as $key => $cond){
				if (!empty($key)) {
					$h = 'tvr_ie_'.$key; wp_register_style($h, $r.$css_min.'ie-'.$key.'.css'.$mts); wp_enqueue_style($h);
					$wp_styles->add_data($h, 'conditional', $cond);
				}
			}
		}
		if (!empty($p['load_js'])) {
			$h = 'mt_user_js'; wp_register_script($h, $r.'active-scripts.js'.$mts); wp_enqueue_script($h);
		} if (!empty($p['active_events'])) {
			$h = 'mt_animation_events'; wp_register_script($h, $r.'animation-events.js'.$mtv, array('jquery')); wp_enqueue_script($h);
			wp_localize_script( $h, 'MT_Events_Data', json_decode($p['active_events']) );
		}
	}
	function add_microthemer_body_classes($classes){
		global $post; if (isset($post)) {
			$classes[] = 'mt-'.$post->ID; $classes[] = 'mt-'.$post->post_type.'-'.$post->post_name;
		}
		return $classes;
	}
	add_action('wp_enqueue_scripts', 'add_microthemer_css', 999999);
	add_filter( 'body_class', 'add_microthemer_body_classes');
}
/* End Microthemer Code */

Cheers,
Sebastian

You must login or register to reply to this topic.