Hi there,
I am trying to change the <meta name=”viewport”>
I found there is a filter in GeneratePress that does this (generate_meta_viewport), but I can’t seem to get it working.
Current code:
add_filter( 'generate_meta_viewport', 'my_meta_viewport' );
function my_meta_viewport() {
return 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0';
}
I also noticed there is a function now in WordPress itself since 5.5.0.
https://developer.wordpress.org/reference/functions/wp_admin_viewport_meta/
But I can’t seem to get that one working either.
I am using Code Snippets to add the filter and I have it set to frontend only, but even when running it everywhere it doesn’t work.
Hope someone can help me out.