Wordpress Kod Arsivi
WordPress Versiyonu ;
1 |
<?php bloginfo('version'); ?> |
Atom Adresi ;
1 |
<?php bloginfo('atom_url'); ?> |
RSS adresi ;
1 |
<?php bloginfo('rss2_url'); ?> |
Karakter Kodlaması ;
1 |
<?php bloginfo('charset'); ?> |
Blog Adı ;
1 |
<?php bloginfo('name'); ?> |
Blog Açıklaması ;
1 |
<?php bloginfo('description'); ?> |
Blog Adresi ;
1 |
<?php bloginfo('url'); ?> |
Stil Dosyası ;
1 |
<?php bloginfo('stylesheet_url'); ?> |
Tema Yolu ;
1 |
<?php bloginfo('template_url'); ?> |
Header.php çağırır ;
1 |
<?php get_header(''); ?> |
Sidebar.php çağırır ;
1 |
<?php get_sidebar(''); ?> |
Footer.php çağırır ;
1 |
<?php get_footer(''); ?> |
Kategorileri Listele ;
1 |
<?php wp_list_cats('title_li='); ?> |
Sayfaları Listele ;
1 |
<?php wp_list_pages('title_li='); ?> |
Takvim Göster ;
1 |
<?php get_calendar(''); ?> |
Arşivleri Listele ;
1 |
<?php wp_get_archives('') ?> |
While Döngüsü ;
1 |
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>Çekilecek Veriler<?php endwhile;else : ?> |
Yazı Başlışı ;
1 |
<?php the_title(''); ?> |
Yazı Adresi ;
1 |
<?php the_permalink('') ?> |
Yazı Kategorisi ;
1 |
<?php the_category(', ') ?> |
Yazı Tarihi ;
1 |
<?php the_time('j F Y'); ?> |
Yazı İçeriği ;
1 |
<?php the_content(''); ?> |
Yazının yayınladığı saat ;
1 |
<?php the_time('H:i:s'); ?> |
Yazıya Yapılan Yorum Sayısı ;
1 |
<?php comments_popup_link(__('Yorum yapılmamış'), __('1 yorum yapılmış'), __('% yorum yapılmış'), '', __('Yorumlara kapalı')); ?> |
Yazı Okunma Sayısı (WP-PostViews eklentisi gerekir) ;
1 |
<?php if(function_exists('the_views')) { the_views(); } ?> |
Yazı İD ;
1 |
<?php the_ID(); ?> |
Yazı Düzenleme Linki ;
1 |
<?php edit_post_link(); ?> |
Yorum Şablonu (Comments.php) ;
1 |
<?php comments_template(); ?> |
Yazar adı ;
1 |
<?php the_author(''); ?> |
Yazar Hakkında ;
1 |
<?php the_author_description(''); ?> |
Yazar İsmi ;
1 |
<?php the_author_firstname(''); ?> |
Yazar Soyismi ;
1 |
<?php the_author_lastname(''); ?> |
Yazar’ın Makale sayısı ;
1 |
<?php the_author_posts('');?> |
Yazar Sayfası ;
1 |
<?php the_author_link('');?> |
Yazar’ın Web Sitesi ;
1 |
<?php the_author_url(''); ?> |
Yazar’ın E-Mail Adresi ;
1 |
<?php the_author_email('');?> |
Sonraki Yazı Linki ;
1 |
<?php next_post_link('') ?> |
Önceki Yazı Linki ;
1 |
<?php previous_post_link('') ?> |
Sayfalama (Pagenavi gerekir) ;
1 |
<?php wp_pagenavi(); ?> |
Öne Çıkarılmış Resim
While döngüsü içerisinde ;
1 |
<?php if ( has_post_thumbnail() ) {the_post_thumbnail();} else {}?> |
funtions.php’de eklenecek ;
1 2 |
add_theme_support( 'post-thumbnails' ); set_post_thumbnail_size( 125, 125 ); |
Konu Kısaltma
While Döngüsü içerisinde ;
1 |
<?php the_excerpt(''); ?> |
functions.php’de eklenecek ;
1 2 3 4 |
function new_excerpt_length($length) { return 12; } add_filter('excerpt_length', 'new_excerpt_length'); |