WordPress.org

Ready to get started?Download WordPress

Forums

Columns
[resolved] Disabeling on mobile device (6 posts)

  1. the_whispering
    Member
    Posted 11 months ago #

    Hello,

    the plugin works perfectly and I got no problems with it. Nice work! But I got a question: Is it possible to disable it dynamically on mobile devices?

    I got a custom theme that looks and works great on both desktop and mobile browsers. However the only thing that looks strange on a phone are the columns which make the text unreadable.

    Cheers,
    Michael

    http://wordpress.org/extend/plugins/columns/

  2. Konstantin Kovshenin
    Member
    Plugin Author

    Posted 10 months ago #

    Sure. You can dequeue the stylesheet in a wp_is_mobile condition, or use a CSS media query to override the styles for narrow screens. Hope that helps!

  3. timdevogel
    Member
    Posted 8 months ago #

    For the digibetics amongst us (me), could you give us some code?

  4. Konstantin Kovshenin
    Member
    Plugin Author

    Posted 8 months ago #

    Something like this, in a plugin, should probably run during an action, most likely at wp_enqueue_scripts at priority 11 or later.

    if ( wp_is_mobile() ) {
        wp_dequeue_style( 'columns' );
    }
  5. crimelovingfunster
    Member
    Posted 2 months ago #

    Hi Konstantin,
    Thanks for this - however I'm awful at following instructions and terrified of code.
    Do I edit your plugin, or the wordpress core code? If so where?
    Apart from not disabling on mobile phones it's a good, easy to use (even my ADHD client can use it...) plug-in.

  6. prepu
    Member
    Posted 3 weeks ago #

    Konstantin, I know that this is an old forum but, can I add the code you have written before to columns.php? I am using your plugin as well but when I use my mobile phone the two columns are unreadable.

    It has to be an easy way to say that if I am using a mobile don't use the two columns.

    Thanks.

Reply

You must log in to post.

About this Plugin

About this Topic