• Being a WordPress-amateur I have found this forum very helpful and full of knowledge, so I try my luck here.

    I have created a WordPress-site with which has a static frontpage and a blog-page that shows blog posts. I have made this according to the instructions in the codex.

    My problem is that the blog only shows one post (the most recent).

    I have created my own theme and when I activate the WP default theme all posts are displayed properly. My loop is copied straight from the default theme’s index.php, but the problem still there.

    Any ideas about where to start looking for the problem?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Check your query syntax, it must be in while loop to query multiple post.

    Might also check your Blog pages show at most setting in Administration > Settings > Reading

    Thread Starter texto

    (@texto)

    This is the loop in my index.php. I copied it straight from the defaul theme’s index.php hoping that might solve my problem, but it didn’t.

    <?php if (have_posts()) : ?>
    
    		<?php while (have_posts()) : the_post(); ?>
    
    			<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
    				<small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>
    
    				<div class="entry">
    					<?php the_content('Read the rest of this entry &raquo;'); ?>
    				</div>
    
    				<p class="postmetadata"><?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?>  <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p>
    			</div>
    
    		<?php endwhile; ?>
    
    		<div class="navigation">
    			<div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
    			<div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
    		</div>
    
    	<?php else : ?>
    
    		<h2 class="center">Not Found</h2>
    		<p class="center">Sorry, but you are looking for something that isn't here.</p>
    		<?php get_search_form(); ?>
    
    	<?php endif; ?>

    In my blog template I have the following code:

    <?php
    /*
    Template Name: Blog
    */
    
    // Which page of the blog are we on?
    $paged = get_query_var('paged');
    query_posts('cat=-0&paged='.$paged);
    
    // Make posts print only first part with a link to rest of the post.
    global $more;
    $more = 0;
    
    //load index to show blog
    load_template(TEMPLATEPATH . '/index.php');
    ?>
    Thread Starter texto

    (@texto)

    My Administration > Settings > Reading is set to show 10 posts.

    I have three posts in my blog but only the most recent is showing.

    Check the tag.

    ONE ‘ isntead of a ” will fuk it up.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Blog only shows one post’ is closed to new replies.