• Resolved RagnaRock

    (@ragnarock)


    hi, im running a wordpress blog with a moded version (by me) of magadine

    this theme originaly doesnot come with the previous/next page button so i haded the following code in the index.php

    <?php previous_posts_link(); ?>
    <?php next_posts_link(); ?>

    the link apears to be fine… but it doesnt work…the page stays the same… what am I doing wrong?

    my blog is at http://www.jogosbaratos.net so that you can test what i’m talking about.

    tks in advance, and sorry for my bad english.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter RagnaRock

    (@ragnarock)

    the entire code of my index.php is this onde

    <?php get_header(); ?>
    		<?php $count = 0;?>
    		<?php query_posts('showposts=8'); ?>
    		<?php if (have_posts()) : ?>
    			<?php while (have_posts()) : the_post(); ?>
    				<div class="onequartercolumn2">
    
    					<?php the_excerpt();?>
    
    					<a href="<?php the_permalink() ?>"><table cellpadding="0" cellspacing="5" border="0" background="http://www.jogosbaratos.info/wp-content/themes/jogosBaratos/images/comment.png" alt="Comentar/ver comentarios" width="48" height="39">
                          <tr><td align="center" valign="top">
    
                            <p class="commentnum">
                              <?php comments_number('0', '1', '%'); ?>
                            </p>
                          </td></tr>
    			        </table></a> 
    
    				</div>
    					<?php
    					if($count == 3 ) {
    					echo "<div style='clear:both;'></div>";}
    					$count = $count+1;
    					?>
    			<?php endwhile; ?>
    			<div id="next"><?php next_posts_link(); ?>
    			<?php previous_posts_link(); ?> </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 endif; ?>
    		<div style='clear:both;'></div>
    		<div id="wrapper13">
    			<div class="onethirdcolumn">
    				<h5>Recent Posts</h5>
    					<ul>
    				 		<?php get_archives('postbypost',5); ?>
    			 		</ul>
    			</div>
    			<div class="onethirdcolumn">
    			<h5>Recent Comments</h5>
    			<ul>
    				<?php include (TEMPLATEPATH . '/simple_recent_comments.php');?>
    				<?php if (function_exists('src_simple_recent_comments')) { src_simple_recent_comments(5, 60, '', ''); } ?>
    			</ul>
    		</div>
    		<div class="onethirdcolumn">
    			<h5>Top Categories</h5>
    			<ul>
      				<?php wp_list_cats(); ?>
      			</ul>
    		</div>
    		<div style='clear:both;'></div>
    	</div>
    
    </div>
    
    <?php get_footer(); ?>
    
    <script type="text/javascript">
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    </script>
    <script type="text/javascript">
    try {
    var pageTracker = _gat._getTracker("UA-10333069-1");
    pageTracker._trackPageview();
    } catch(err) {}</script>
    </body>
    </html>

    hope it helps :S

    Please don’t post huge chunks of code here. For larger blocks of code, use the WordPress pastebin. It makes life easier for everyone.

    In the meantime, if you want to show more than 8 posts in total,try removing:

    <?php query_posts('showposts=8'); ?>

    Thread Starter RagnaRock

    (@ragnarock)

    sorry about that, ive posted the code here http://wordpress.pastebin.ca/1545123

    dont know how to edit my previous post though :s

    Did removing that line in your code work?

    Thread Starter RagnaRock

    (@ragnarock)

    since i only have 9 posts…that would not help me… i can not test this problem without that line of code

    Thread Starter RagnaRock

    (@ragnarock)

    well i got more posts now…removing that line solves the problem..but wordpress shows 10 posts by default and i want to show a multiple of 4 like 12 or 16… how can i do this(withouth messing with the next page button)?

    Thread Starter RagnaRock

    (@ragnarock)

    Solved by using the options in wp-admin instead of the code
    😀 tks

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

The topic ‘“Next Page »” button not working as expected’ is closed to new replies.