Hey,
Thanks for the help, but what you recommended didn’t work ??
Actually here’s the story:
My index.php page is fully static, no loop running and its not connected to the usual wordpress page system.
Now I want to display my posts in a page called “blog” which should be considered as a default wordpress blog page.
I made a new page from wordpress for this which is blank.
I first tried to configure the posts page from wordpress Admin / Settings / Readingl…. but there is no output on that page.
Then I tried to paste the normal wordpress loop in a template and gave that page that template but still there is no output.
Here is my template code:
<?php
/*
Template Name: Blog
*/
?>
<?php get_header() ?>
<div class="main_left">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="featurebox" id="post-<?php the_ID(); ?>">
<div class="insidefuture">
<div class="postinfo"><h3><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3><div class="comments_bubble"><a href="<?php comments_link(); ?>" title="<?php comments_number('0 Comments', '1 Comment', '% Comments'); ?>"><?php comments_number('0','1','%'); ?></a></div></div>
<?php the_content('Read More...'); ?>
<span class="posted_by"><?php the_author_posts_link(); ?></span>
<?php comments_template(); ?>
</div>
<div class="extrainfo"><div class="extral"><div class="block_drop">Categories: <?php the_category(', ') ?></div>
<div class="block_drop">Tags: <?php the_tags(''); ?></div>
</div>
<div class="extrar"><span class="day"><?php the_time('d'); ?></span><span class="month"><?php the_time('M'); ?><span class="year"><?php the_time('Y'); ?></span></span></div></div>
</div>
<?php endwhile; ?>
<div class="next_back">
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } else { ?>
<div class="back_left"><?php next_posts_link('« Older') ?></div>
<div class="next_right"><?php previous_posts_link('Newer »') ?></div>
<?php } ?>
</div>
<?php else : ?>
<div class="featurebox">
<div class="notice">
<h4>Not Found</h4>
<p>Sorry, but you are looking for something that isn't here. Try again :)</p>
</div>
</div>
<?php endif; ?>
</div>
This code works fine if I put it on the index.php file but if I put it on a wordpress page template then the page doesn’t output anything ??
For example: I go and make a page called “blog” then make its “page template” the one which has the above code but the output is nothing.
How can I just make a page output the usual loop?
Thanks!