skip to Main Content

Custom Meta Viewport Tag

This snippet shows how you can alter the default meta viewport tag in the theme. By default the theme uses a responsive tag (the snippet example shows the default tag used by the theme) which also allows zooming into the site on mobile devices. If you wish to disable zooming you may consider using a custom tag.

 * Change the meta viewport tag.
 * @link
add_filter( 'wpex_meta_viewport', function() {
    return '<meta name="viewport" content="width=device-width, initial-scale=1">';
} );
All PHP snippets should be added via child theme's functions.php file or via a plugin (we recommend Code Snippets)
Back To Top