I imagined that it is pretty easy to do: just take everything what is in index.php. Add
<?php
/*
Template Name: Blog
*/
?>
at the top and you all set, but in my case it is not working. I copied everything what was in my index.php, created template-blog.php and added through new page as "new". And this is the result I get: http://bellated.us.lt/new/ (testing page)
It's seems like the blog loop is starting, but it do not go through as it should. Any help will be appreciated. Thanks!
<?php
/*
Template Name: Blog
*/
?>
<?php get_header(); ?>
<!-- BEGIN #content-wrap -->
<div id="content-wrap" class="clearfix">
<div id="content-top"> </div>
<!--BEGIN #primary .hfeed-->
<div id="primary" class="hfeed">
<?php if (have_posts()) : ?>
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* If this is a category archive */ if (is_category()) { ?>
<h1 class="page-title"><?php printf(__('Visi įrašai iš %s', 'framework'), single_cat_title('',false)); ?></h1>
<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
<h1 class="page-title"><?php printf(__('Įrašų ėymĖs %s', 'framework'), single_tag_title('',false)); ?></h1>
<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
<h1 class="page-title"><?php _e('Archyvas', 'framework') ?> <?php the_time('F jS, Y'); ?></h1>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<h1 class="page-title"><?php _e('Archyvas', 'framework') ?> <?php the_time('F, Y'); ?></h1>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<h1 class="page-title"><?php _e('Archyvas', 'framework') ?> <?php the_time('Y'); ?></h1>
<?php /* If this is an author archive */ } elseif (is_author()) { ?>
<h1 class="page-title"><?php _e('Visi įrašai pagal', 'framework') ?> <?php echo $curauth->display_name; ?></h1>
<?php /* If this is a category archive */} elseif (is_search()) { ?>
<h1 class="page-title"><?php _e('Paieškos rezultatai: ', 'framework'); echo '"'.$_GET['s'].'"'; ?></h1>
<?php } ?>
<?php while (have_posts()) : the_post(); ?>
<!--BEGIN .hentry -->
<div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'framework'), get_the_title()); ?>"> <?php the_title(); ?></a></h2>
<!--BEGIN .entry-meta .entry-header-->
<div class="entry-meta entry-header">
<span><?php _e('pagal', 'framework') ?></span> <?php the_author(); ?> <span><?php _e('·', 'framework') ?></span> <?php the_time('Y/m/j H:i'); ?> <span><?php _e('·', 'framework') ?></span> <?php the_category(', ') ?> <span><?php _e('·', 'framework') ?></span> <?php comments_popup_link(__('Komentarų nėra', 'framework'), __('1 Komentaras', 'framework'), __('% Komentarai', 'framework')); ?> <?php edit_post_link( __('', 'framework'), '<span class="edit-post">[', ']</span>' ); ?><a href="http://twitter.com/share" class="twitter-share-button" data-url="<?php the_permalink(); ?>" data-text="<?php bloginfo('name'); ?>: <?php the_title(); ?>," data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
</div>
<?php /* if the post has a WP 2.9+ Thumbnail */
if ( (function_exists('has_post_thumbnail')) && (has_post_thumbnail()) ) : ?>
<div class="post-thumb post-lead">
<a title="<?php printf(__('Permanent Link to %s', 'framework'), get_the_title()); ?>" href="<?php the_permalink(); ?>"><?php the_post_thumbnail('archive-thumb'); /* post thumbnail settings configured in functions.php */ ?></a>
</div>
<?php endif; ?>
<!--BEGIN .entry-content -->
<div class="entry-content">
<?php the_content(__('Skaityti toliau →', 'framework')); ?>
<!--END .entry-content -->
</div>
<!--END .hentry-->
</div>
<?php endwhile; ?>
<!--BEGIN .navigation .page-navigation -->
<div class="navigation page-navigation clearfix">
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } else { ?>
<div class="nav-next"><?php next_posts_link(__('← Senesni įrašai', 'framework')) ?></div>
<div class="nav-previous"><?php previous_posts_link(__('Naujesni įrašai →', 'framework')) ?></div>
<?php } ?>
<!--END .navigation ,page-navigation -->
</div>
<?php else : ?>
<!--BEGIN #post-0-->
<div id="post-0" <?php post_class(); ?>>
<h2 class="entry-title"><?php _e('Ups, puslapis nerastas', 'framework') ?></h2>
<!--BEGIN .entry-content-->
<div class="entry-content">
<p><?php _e("Atsiprašome, bet puslapis, kurio ieškote nerastas.", "framework") ?></p>
<?php get_search_form(); ?>
<!--END .entry-content-->
</div>
<!--END #post-0-->
</div>
<?php endif; ?>
<!--END #primary .hfeed-->
</div>
<div id="content-btm"> </div>
<!-- END #content-wrap -->
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>