Archived topic
Generate Disable Mobile Plugin needs to be updated
6 replies · Started by bluebit on October 6, 2017
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
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.
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
nevermind just fixed it, but how can i add that code safely as a snippet?
Sorry about that! Just adjusted the code.
You should just be able to add it as a Code Snippet and activate it :)
thanks that worked
You're welcome :)