[Resolved] Generate Disable Mobile Plugin needs to be updated

Home Forums Support [Resolved] Generate Disable Mobile Plugin needs to be updated

Home Forums Support Generate Disable Mobile Plugin needs to be updated

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #398774
    bluebit

    My Wordfence plugin scan says the Generate Disable Mobile Plugin hasn’t been updated to the latest version of WordPress, would be nice if it could get updated. Thanks

    #398811
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    That plugin will likely be removed from the directory soon.

    There’s a better way to disable mobile now with a simple function:

    add_filter( 'generate_meta_viewport', 'tu_disable_mobile' );
    function tu_disable_mobile() {
        if ( is_page( 'my-page' ) ) {
             return '<meta name="viewport" content="width=1024">';
        }
    }

    Just set 1024 to your container width.

    #399224
    bluebit

    I just placed the code in my code snippets plugin and this came up

    Fatal error: Call to undefined function add_fiter() in /home1/fsx1987/public_html/wildlatina.co/wp-content/plugins/code-snippets/php/snippet-ops.php(433) : eval()’d code on line 1

    How do I fix this? I went into the file manager, disabled the plugin, then deleted it, then reinstalled it, but everytime i reinstall it the site goes haywire.

    Updated Fixed see next comment

    #399225
    bluebit

    nevermind just fixed it, but how can i add that code safely as a snippet?

    #399232
    Tom
    Lead Developer
    Lead Developer

    Sorry about that! Just adjusted the code.

    You should just be able to add it as a Code Snippet and activate it ๐Ÿ™‚

    #399730
    bluebit

    thanks that worked

    #399736
    Tom
    Lead Developer
    Lead Developer

    You’re welcome ๐Ÿ™‚

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.