Ready to get started?Download WordPress


[resolved] Home page posts then more posts (3 posts)

  1. tydende
    Posted 6 years ago #

    This seems like such an incredibly basic question, but i can't find the answer or get it to work.

    I want to post 10 posts on my home page, got that, with "next page" and "previous page" buttons below linking to the next posts in order.

    i tried
    <?php posts_nav_link(' • ', __('« Newer Entry'), __('Older Entry »')); ?>

    and a few other similar codes, but when i clcik on the "next Page", or "Older Entry" it just shows the same 10 posts as the first page.

    Any ideas?


  2. tydende
    Posted 6 years ago #

    here's the code on page

    $page = (get_query_var('paged')) ? get_query_var('paged') : 1;
    <?php if (have_posts()) : while (have_posts()) : the_post();
    if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); ?>

    <div class="post" id="post-<?php the_ID(); ?>">

    <h2>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></h2>

    <div class="entry"><p>
    <?php if(function_exists(digg_this)) { digg_this('', '', '', ''); } ?>
    <?php the_content('Read the rest'); ?>
    <img src="http://www.iamelephant.com/assets/images/comment.jpg"><?php comments_popup_link('Comment!'); ?></p>

    <p class="postinfo">By <?php the_author_posts_link(); ?> on <?php the_time('M j, Y') ?> in <?php the_category(', ') ?> | <?php

    comments_popup_link('0 Comments', '1 Comment', '% Comments'); ?><?php edit_post_link('Edit', ' | ', ''); ?></p>

    <?php endwhile; endif; ?>

    <div class="navigation"><p><?php posts_nav_link(); ?></p></div>

  3. mckayphotography
    Posted 5 years ago #

    I had the same issue, and used this code which worked - I dont know why (i grabbed it from another theme) but it does so I'm happy :)

    '<?php if (have_posts()) : ?>

    <?php $i = 0; ?>
    <?php while (have_posts()) : the_post(); $i++; ?>
    <div class="span-8 post-<?php the_ID(); ?><?php if ($i == 3) { ?> last<?php } ?>">'

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.