-
AuthorPosts
-
January 12, 2015 at 12:59 am #181022
In every html file, the header has following opening line:
<head> <meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">
I suppose one of your PHP file fetches it using a code like this
<head> <meta charset=<?php bloginfo('charset'); ?>" />
In my old theme, the developer had suggest a tweak so that instead of fetching this chartset info from SQL data everytime it’d simply write it manually i.e.
<head> <meta charset="UTF-8">
My question:
Where is such file located in x-theme installation
How do I accomplish it?PS:
I am forced to such minor tweaks because stupid webhosting company (=godaddy) is not increasing my memory limit despite behind on the highest plan on managed wordpress, and I lack the expertise to run a VPS on my own.
Hence trying to get maximum “mileage” with such tom-foolery.January 12, 2015 at 7:49 am #181231Hi,
Thanks for writing in!
To achieve this, create file _header.php in wp-content/themes/{CHILD THEME DIRECTORY}/framework/views/global
and copy the code below into that file.<?php // ============================================================================= // VIEWS/GLOBAL/_HEADER.PHP // ----------------------------------------------------------------------------- // Declares the DOCTYPE for the site and include the <head>. // ============================================================================= ?> <!DOCTYPE html> <!--[if IE 9]><html class="no-js ie9" <?php language_attributes(); ?>><![endif]--> <!--[if gt IE 9]><!--><html class="no-js" <?php language_attributes(); ?>><!--<![endif]--> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title><?php wp_title(''); ?></title> <link rel="profile" href="http://gmpg.org/xfn/11"> <link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>"> <?php wp_head(); ?> </head> <body <?php body_class(); ?>> <?php do_action( 'x_before_site_begin' ); ?> <div id="top" class="site"> <?php do_action( 'x_after_site_begin' ); ?>
Hope that helps.
January 12, 2015 at 1:38 pm #181446will there be any unforseen circumstances in putting this line
<meta name="viewport" content="width=device-width, initial-scale=1.0">
for example- my site uses responsive-adsense units. will there be any conflict with this ‘device-width’ thing?January 13, 2015 at 2:05 am #181758Hi,
That line of code is already there by default in the theme.
Thanks
-
AuthorPosts