Aşağıda ki kodları kopyalayıp page-blog.php adı altında kaydedin sunucunuza atın. Yeni bir sayfa oluşturun. Sağ tarafta bulunan sayfa özellikleri kısmında şablon olarak Blog Template i seçip sayfayı yayınlayın. Menü ayarlarından eklediğiniz sayfayı menüye ekleyin ve kontrol edin.
Aşağıda ki şablon temanın ham halidir ve index.php kodlarıdır.
<?php
/*
Template Name: Blog Template
*/
?>
<?php get_header();?> <section class="enLezzetliYer"> <?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?> <article class="lezzetiPaylas"> <div class="konuResim"> <input id="konu-<?php the_ID(); ?>" type="checkbox"> <label for="konu-<?php the_ID(); ?>" class="switch icon-plus"></label> <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"> <?php if (has_post_thumbnail()) { the_post_thumbnail(array(100,100)); } elseif (get_post_meta($post->ID, "resim", true) != '') { ?> <img src="<?php echo get_post_meta($post->ID, "resim", true); ?>" alt="<?php the_title(); ?>" width="100" height="100" /> <?php } else { ?> <img src="<?php echo bloginfo('template_url'); ?>/images/resim-yok.gif" alt="Resim Bulunmamaktadır" title="<?php the_title();?>"/> <?php } ?></a> <ul> <li><a class="icon-facebook" title="Facebook'ta Paylaş!" target="_blank" href="http://www.facebook.com/share.php?u=<?php the_permalink('') ?>"></a></li> <li><a class="icon-twitter" title="Twitter'da Paylaş!" target="_blank" href="http://twitter.com/?status=<?php the_title(); ?> <?php the_permalink(); ?>"></a></li> <li><a class="icon-tumblr" title="Tumblr'da Paylaş!" target="_blank" href="http://www.tumblr.com/share/link?url=<?php echo urlencode(get_permalink()) ?>&name=<?php echo urlencode(get_the_title()) ?>&description=<?php echo urlencode($img . get_the_excerpt()) ?>"></a></li> <li><a class="icon-google-plus" title="Google Plus'ta Paylaş!" target="_blank" href="https://plus.google.com/share?url=<?php the_permalink('') ?>"></a></li> <li><a class="icon-linkedin" title="Linkedin'de Paylaş!" target="_blank" href="https://www.linkedin.com/cws/share?isFramed=true&lang=tr_TR&url=<?php the_permalink('') ?>"></a></li> <li><a class="icon-pinterest" title="Pinterest'te Paylaş!" target="_blank" href="http://pinterest.com/pinthis?url=<?php the_permalink('') ?>"></a></li> <li><a class="icon-rss" title="RSS" target="_blank" href="<?php the_permalink('') ?>feed"></a></li> </ul> </div> <h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2> <ul class="konubilgiler"> <li class="masayaOturma"><strong><?php echo human_time_diff(get_the_time('U'), current_time('timestamp')); ?> önce</strong>, <?php the_author(); ?> tarafından yazılmıştır.</li> <li class="masadakikisiler"><i class="icon-comment"></i><?php comments_popup_link('0 Yorum', '1 Yorum', '% Yorum'); ?></li> <li class="yanmasadanbakanlar"><i class="icon-sitemap"></i><?php the_category(','); ?></li> </ul> <div class="konuIcerik"> <?php the_content('(Devamını Oku)'); ?> </div> </article> <?php endwhile; ?> <!-- Konu Kismi Biter --> <?php sayfalama(); ?> <?php else : ?> <article class="lezzetiPaylas"> <div class="konuIcerik"> <br/> <h2> Bulunamadı. </h2> <br/> <p>Konu bulunamadı.</p> </div> </article> <?php endif; ?> </section> <?php get_sidebar();?> <?php get_footer(); ?>
Dediğiniz gibi şablon olayı cıkıyor lakin yayınladığım sayfa boş olarak cıkıyor.
http://ayemredi.com/deneme-sayfam
bakabilirsiniz.