Created
December 14, 2024 09:04
-
-
Save nextab/5760e8043e763e9bb9b51d341b82e5ec to your computer and use it in GitHub Desktop.
Divi by Elegant Themes is a WordPress theme with a catch: You can't pinch zoom your website. This is not in accordance with WCAG standards, but you can change it very easily with this quick snippet for your child theme's functions.php.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function nxt_remove_et_viewport_meta() { | |
remove_action('wp_head', 'et_add_viewport_meta'); | |
} | |
add_action('after_setup_theme', 'nxt_remove_et_viewport_meta'); | |
function nxt_enable_zoom() { | |
echo '<meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0, minimum-scale=0.1, maximum-scale=10.0">'; | |
} | |
add_action('wp_head', 'nxt_enable_zoom'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment