Next/Previous Button On Wordpress

Discussion in 'PHP' started by banks1, Aug 12, 2009.

  1. #1
    Hi guys,

    On my blog (iblogplanet.com), I'm having a little trouble.

    In the file index.php (the main page), I am trying to add Next/Previous button. I when "Previous" is clicked, I want it to show the previous articles.

    I see the followingcide in index.php:

    <a href="#" class="next"><?php fs_lang("Next Article"); ?></a>
    <a href="#" class="prev"><?php fs_lang("Previous Article"); ?></a>


    Yet, I don't see the Next/Previous buttons.

    Anybody know of a solution?
     
    banks1, Aug 12, 2009 IP
  2. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #2
    Well let's see , you say on the front page you want next/previous article. The default theme does it by 10's.
    and the code is this :

    			<div class="alignleft"><?php next_posts_link('&laquo; Older Entries') ?></div>
    			<div class="alignright"><?php previous_posts_link('Newer Entries &raquo;') ?></div>
    Code (markup):
    If you want it on a single post, you would have to edit single.php and the code is this:


    			<div class="alignleft"><?php previous_post_link('&laquo; %link') ?></div>
    			<div class="alignright"><?php next_post_link('%link &raquo;') ?></div>
    
    Code (markup):
    Course that probably isn't the issue. You're using the QuickRise theme, I'm not positive but its highly likely it's using a home.php file for the Blog main page. Check that file and you might have to copy the code over to it.
     
    shallowink, Aug 12, 2009 IP
  3. banks1

    banks1 Peon

    Messages:
    1,325
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for replying :)

    I just checked through the theme files. There is no home.php.
     
    banks1, Aug 12, 2009 IP