• I’m using a responsive theme with the Side Matter plugin, which works great except in mobile browsers. Then, there is still space between each of the notes (including at the top) which looks funny when it’s not beside the content. What I would like is to remove the margin at the top in mobile browsers, but I can’t seem to figure out how.

    I’ve tried adding some CSS but it doesn’t seem to work.

    Any suggestions?

    Thanks.

    https://www.ads-software.com/plugins/side-matter/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author setzer

    (@setzer)

    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'] )
    	) );

    I’d be curious to see how you’ve handled this.
    Also looking for a way to keep side-matters [ref] restitution and links but stop the height adjusting in narrow browsers.

    In other terms a way to switch from side-notes to end-notes.

    The suggested ‘wp_is_mobile’ solution seems very blunt, and not very handy for building purposes.

    Any ideas?

    I would also be interested in a such a fix. On mobile, having the notes on the side isn£t practical at all. It would really be better to “transform” them into foot notes when the plugin detects that the device is a smartphone.

    Thank you !

    If you require assistance then, as per the Forum Welcome, please post your own topic instead of tagging onto someone else’s topic.

    I am now closing this 3 month old topic as it references an older version of WordPress.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Adjusting in responsive theme for mobile browsers’ is closed to new replies.