WordPress.org

Ready to get started?Download WordPress

Forums

Yoko
Older Post not working. (1 post)

  1. Ralph1989
    Member
    Posted 1 year ago #

    Hello, I am making a website with the yoko theme. there is one problem left with the site. the problem is that you cannot click on the "Older Post" link on the homepage. when you do you get the permalink /page/2
    But this page looks exactly the same with the same post not the following 3 in line. This is the php script i use, i searched the web but couldn't find my answer so i was hoping to find it here.

    <?php /* Start the Loop */ ?>
    		 <?php
    		  $myqueryname = $wp_query;
    		  $wp_query = null;
    		  $wp_query = new WP_Query();
    		  $wp_query->query('showposts=3'.'&paged='.$paged);
    		 ?>
    <?php while ( have_posts() ) : the_post(); ?>
    
    <?php get_template_part( 'content', get_post_format() ); ?>
    
    <?php endwhile; ?>
    
    <?php /* Display navigation to next/previous pages when applicable */?>
    <?php if (  $wp_query->max_num_pages > 1 ) : ?>
    <nav id="nav-below">
    <div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'yoko' ) ); ?></div>
    <div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'yoko' ) ); ?></div>
    </nav><!-- end nav-below -->
    <?php endif; ?>

    Thanks in advance!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags