Adding functions.php file to child theme
-
Hi
I need to add the functions.php file to my child theme. I have been reading how to do it but I’m still not quite getting it and the code I am adding is causing blank pages to load. What I am trying to do is alter the existing viewport meta tag. This is what I want to change it to: <meta name=”viewport” content=”width=device-width, initial-scale=1.0″ />
Below is the exact code I have added to the functions.php file in my child theme folder. I don’t know what I am doing wrong. I must be missing something. Thanks for any help ??
<?php function et_add_viewport_meta(){ echo '<meta name="viewport" content="width=device-width, initial-scale=1.0" />'; } add_action( 'wp_head', 'et_add_viewport_meta' );
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Adding functions.php file to child theme’ is closed to new replies.