• Resolved Frederic Legrand

    (@fredericlegrand)


    Great plugin!

    I have a quick question

    Disable on mobile function works but i did try your suggested function to remove shortcode but it did not work

    if( wp_is_mobile() ){
    if( defined( ‘EOS_INIT_ACTIVE’ ) && EOS_INIT_ACTIVE ){
    //Whatever you need to fire
    add_shortcode( ‘[ywfbt_form product_id=””]’,’_return_false’ );
    }
    }

    any ideas?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jose

    (@giuse)

    Hi @fredericlegrand

    the right code would be this:

    if( wp_is_mobile() ){
        if( defined( ‘EOS_INIT_ACTIVE’ ) && EOS_INIT_ACTIVE ){
            //Whatever you need to fire
            add_shortcode( ‘ywfbt_form’,’__return_false’ );
        }
    }

    You have to put only the name of the shortcode, and be careful about the underscores in “__return_false’. There are two underscores before the word before return_false.

    The code above will work supposing the main file of the plugin that introduces the shortcode is init.php.

    Thread Starter Frederic Legrand

    (@fredericlegrand)

    thks Jose for quick support
    I hope you ll be making good money with pro version soon
    You can put me on beta user

    You should make that mobile deactivate feature a paid version

    Plugin Author Jose

    (@giuse)

    Hi @fredericlegrand

    you are welcome! Thank you very much, also for the idea!

    In the future, the PRO version will give the possibility to disable plugins on mobile on specific pages,
    The free version will continue to give the possibility to disable them on mobile but without taking into account specific pages.

    In a near future, I will need beta testers. Thank you for the offer!

    Thread Starter Frederic Legrand

    (@fredericlegrand)

    Back to same topic

    add_shortcode(‘[ywfbt_form id=”001″]’,’__return_false’ );

    do you think it s possible to filter it by ID too?

    Thread Starter Frederic Legrand

    (@fredericlegrand)

    actually there is this method too
    I ll try it

    https://how2buy.net/wordpress-shortcode-display-text-ads-mobile/

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘hide mobile’ is closed to new replies.