- This topic has 5 replies, 2 voices, and was last updated 10 years ago by Sakin.
Viewing 6 posts - 1 through 6 (of 6 total)
-
AuthorPosts
-
March 1, 2014 at 3:22 am #20829WebsiteguyMember
Hi
How can I enable zooming in my child theme?
To enable it you put the code
<meta name="viewport" content="width=device-width, initial-scale=1" />
and you put it in your header.php. I won’t to add it to a plugin or the functions.php.I tried this.
function zoom_site() { echo '<meta name="viewport" content="width=device-width, initial-scale=1" />'; } add_action('wp_head', 'zoom_site', 1);
But it didn’t work.
Any suggestions would be much appreciated.
ThanksMarch 1, 2014 at 9:24 pm #20844SakinKeymaster@Websiteguy: just add the following code in your child theme functions.php file.
// Removing the Default Slider function unhook_catcheverest_functions() { remove_action( 'wp_head', 'catcheverest_responsive', 5 ); } add_action( 'init', 'unhook_catcheverest_functions' ); //Responsive Meta in Child Theme function catcheverest_child_responsive() { // Getting data from Theme Options global $catcheverest_options_settings; $options = $catcheverest_options_settings; $disable_responsive = $options[ 'disable_responsive' ]; if ( $disable_responsive == "0" ) { echo '<meta name="viewport" content="width=device-width, initial-scale=1.0">'; } } add_action( 'wp_head', 'catcheverest_child_responsive', 5 );
March 2, 2014 at 2:51 am #20857WebsiteguyMemberWill this work on any theme?
March 2, 2014 at 8:49 pm #20868SakinKeymaster@Websiteguy: That is for Catch Everest Theme and every theme will have different code.
May 17, 2014 at 9:21 pm #31148WebsiteguyMemberI solved this without a code. I just put the <meta name=”viewport” content=”width=device-width, initial-scale=1″ /> code in the settings webmaster tool > Code to display in Header.
May 17, 2014 at 9:39 pm #31152SakinKeymaster@Websiteguy: That’s nice and clever work. Cheers 🙂
-
AuthorPosts
Viewing 6 posts - 1 through 6 (of 6 total)
- The topic ‘Enable Zooming in Child Theme’ is closed to new replies.