WordPress.org

Ready to get started?Download WordPress

Forums

Any Mobile Theme Switcher
php to hide/show widget or any html on mobile (eg: !is_mobile) (2 posts)

  1. Black Hati
    Member
    Posted 1 year ago #

    Hi all, i love this plugin. anyway i want to customize my themes on mobile device view (to more minimal), some of widget very high usage or big/not responsive.

    How to hide widget/code/html on mobile view using php?

    sample

    <?php if( !is_mobile() ) { ?>
    <!-- ## BEGIN: below is widget or anything to hide on mobile ## -->

    ANY BIG MEMORY USAGE WIDGET TO HIDE, PUT HERE. ONLY SHOW ON DESKOP.

    <!-- ## / END: hide mobile code ## -->
    <?php } ?>

    What should be replaced with that !is_mobile() ???

    http://wordpress.org/extend/plugins/any-mobile-theme-switcher/

  2. Black Hati
    Member
    Posted 1 year ago #

    Ok done. after try and try, here is:

    <?php if(!loadMobileTheme()) { ?>
    haha

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.