• Hi,

    I’ve already seen this issue reported before [url]http://wordpress.org/support/topic/199720?replies=10[/url]

    But there is no solution anywhere to be found. The issue is when you click “Previous Entries” the latest post on the blog will always appear on top, eventhough you’re not even on the first page anymore.

    I use this code in index.php

    <div class="navigation">
    			<div class="alignleft"><?php next_posts_link('&laquo; Previous Entries') ?></div>
    			<div class="alignright"><?php previous_posts_link('Next Entries &raquo;') ?></div>
    		</div>

    I can’t seem to figure this one out, im thinking it’s something with this:

    <?php if (have_posts()) : ?>
    
    		<!-- First Post -->
      	<?php $top_query = new WP_Query('showposts=1'); ?>
      	<?php while($top_query->have_posts()) : $top_query->the_post(); $first_post = $post->ID; ?>
    
    			<div class="post top" id="post-<?php the_ID(); ?>">
    				<h2 class="first"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    				<span class="postmetadata">&bull; <?php the_time('l, F jS, Y') ?> <?php edit_post_link('Edit', '(', ')'); ?></span>
    
    				<div class="entry">
    					<?php the_content("<span class=\"continue\">" . __('Continue reading','') . " '" . the_title('', '', false) . "'</span>"); ?>
    				</div>
    			</div>
    
    		<?php endwhile; ?>
    
    		<!-- Next few posts -->
    		<?php while(have_posts()) : the_post(); if(!($first_post == $post->ID)) : ?>	
    
    			<div class="post lastfive" id="post-<?php the_ID(); ?>">
    				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    				<span class="postmetadata">&bull; <?php the_time('l, F jS, Y') ?> <?php edit_post_link('Edit', '(', ')'); ?></span>
    
    				<div class="entry">
    					<?php the_content(); ?>
    				</div>
    			</div>
    
    		<?php endif; endwhile; ?>

    I would love if someone could point me in the right direction, i’ve been searching for hours and found nothing but dead threads with people who had the same problem but apparently solved them

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • That code says to always grab the first post and show it like that. It looks like you’re trying to do a sticky post?

    dorran

    (@dorran)

    I think he wants help to figure out how to change the code to only display the first post on the first page?

    I’d like to see that to, i’m no coder and im using a theme that acts in the exact same way, which is confusing when you browse pages.

    doranpalmer

    (@doranpalmer)

    No what he’s referring to is an error I’ve come across where even though you’re viewing page 2 or more of an archive, even the main archive, it still shows the first page of posts.

    Not sure what does it but I’d like to have it fixed as well … messing up my theme to work around it.

    Thread Starter Rado

    (@jeriksson)

    Yes exactly. The top (latest) post always shows up on top which is very confusing.

    If anyone has a clue how to fix this i’d be willing to pay for the code.

    Please reply to the thread!

    dorran

    (@dorran)

    I don’t think you have to pay for this, i think the solution is already out there, it’s just a matter of finding it.

    Maybe get in touch with the guy who developed the theme chaoticsoul (bryan something).

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘ChaoticSoul – First post appears on all pages’ is closed to new replies.