Quantcast
Channel: responsive – WordPress.org Forums
Viewing all articles
Browse latest Browse all 16569

setzer on "[Plugin: Side Matter] Adjusting in responsive theme for mobile browsers"

$
0
0

Hi wearingfilm,

Sorry for the belated response. This is a tricky problem. There's no solution I know of that wouldn't involve digging around in your theme or Side Matter. One rather crude approach might be to use the wp_is_mobile conditional function in the Side Matter plugin file to tell Side Matter "if the viewer is on a mobile device, don't load the sidenote positioning script."

Try replacing lines 361-368 of /wp-content/plugins/side-matter/side-matter.php with the following and see if it works:

wp_enqueue_style( 'side-matter', plugins_url( 'css/side-matter.css', __FILE__ ), null, $this->version );
if ( wp_is_mobile() ) return;
wp_enqueue_script( 'side-matter-js', plugins_url( 'js/side-matter.js', __FILE__ ), array( 'jquery' ), $this->version, true );
wp_localize_script( 'side-matter-js', 'side_matter', array(
	'is_responsive' => __( $this->options['is_responsive'] ),
	'use_effects' => __( $this->options['use_effects'] ),
	'note_adjust' => __( $this->options['note_adjust'] ),
	'html_class' => __( $this->options['html_class'] )
	) );

Viewing all articles
Browse latest Browse all 16569

Trending Articles