4 - Header optimizasyonu.
Header.php dosyanızda aşağıdaki kodu ;
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="
<?php bloginfo('html_type'); ?>;
charset=<?php bloginfo('charset'); ?>" />Bu kodlarla değiştirin ;
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
Bu da sitenizin hızlanmasına yardımcı olur ve gereksiz database sorgusu yapmaz.
Bunların dışında headerdaki dğier sorguları da kaldırmanız yararınıza olacaktır. Nedir bunlar derseniz:
1.
<link rel="stylesheet" href="
http://www.ste.com/wp-content/themes/temanız/style.css" type="text/css" media="screen" />
<link rel="stylesheet" href="
http://www.site.com/wp-content/themes/temanız/dropdown.css" type="text/css" media="screen" />
<link rel="Shortcut Icon" href="
http://www.site.com/wp-content/themes/temanız/images/favicon.ico" type="image/x-icon" />
<link rel="alternate" type="application/rss+xml" title="site rss feed" href="
http://www.site.com/feed" />
<link rel="pingback" href="
http://www.site.com/xmlrpc.php" />
Bu ve buna benzer sorguları kaldırarak mysql sorgunuzu azaltabilir ve sitenizin hızlı acılmasını sağlayabilirsiniz.
Aynı işlemleri footer içinde uygulamanız menfaatinize olacaktır.
Teşekkürler hoş bir yazı olmuş..