
30-10-2011, 01:00:01
|
| |
Alıntı: SNaRe Nickli Üyeden Alıntı
Wordpress te seo olayı için başlık çok önemli etken. Bende kendime güzel bir başlık şablonu araştırıyordum. Aralarında bence en uygun olanı buldum . Kod: <title>
<?php wp_title(''); ?>
<?php if(wp_title(' ', false)) { echo ' | '; } ?>
<?php bloginfo('name'); ?>
</title> Bu şekilde yaparsanız iç sayfalardaki format şu olacak
Başlık | Blog ismi
Anasayfada İse Sadece
Blog İsmi
Daha farklı önerileriniz varsa fikirlerinizi bekliyorum | Bir temadan faydalanarak geliştirdiğim kendi title etiketim: PHP- Kodu:
<title><?php $sayfa=get_query_var('page'); if ($sayfa) echo 'Sayfa: '.$sayfa; if ($paged) echo 'Sayfa: ' . $paged; ?>
<?php if ($sayfa) echo ' – ' ?><?php if ($paged) echo ' – ' ?>
<?php if ( is_home() ) { bloginfo('description'); print ' – '; bloginfo('name');}
elseif ( is_search() ) { _e('Arama Sonuclari'); print ': '; the_search_query(); print ' – '; bloginfo('name');}
elseif ( is_author() ) { _e('Yazar'); print ': '; the_author_posts(); print ' – '; bloginfo('name');}
elseif ( is_single() ) { wp_title(''); print ' – '; bloginfo('name');}
elseif ( is_page() ) { wp_title(''); print ' – '; bloginfo('name');}
elseif ( is_category() ) { single_cat_title(); print ' – '; bloginfo('name');}
elseif ( is_day() ) { the_time('d'); print ' '; the_time('F'); print ' '; the_time('Y'); print ' – '; bloginfo('name');}
elseif ( is_month() ) { the_time('F'); print ' '; the_time('Y'); print ' – '; bloginfo('name');}
elseif ( is_year() ) { the_time('Y'); print ' – '; bloginfo('name'); }
elseif ( is_404() ) { wp_title(''); print ' – '; bloginfo('name'); }
elseif (function_exists('is_tag')) { if ( is_tag() ) { single_tag_title("", true); print ' – '; bloginfo('name'); } } ?></title> Kendi geliştirdiğim keywords etiketim: 'yazının etiketlerini de ekler' PHP- Kodu:
<meta name="keywords" content="<?php $posttags = get_the_tags(); if ($posttags) { foreach($posttags as $tag) { echo $tag->name . ', '; } } ?>,key1,key2,key3,key4" /> Not: key1,2,3,4: Statik diğerleri Dinamiktir
Demo: www.xxl.onurboz.com, www.wp.onurboz.com
Konu Vody tarafından (30-10-2011 Saat 01:03:02 ) değiştirilmiştir..
|