How to add "Previous" and "Next" to bottom

Discussion in 'HTML & Website Design' started by Kaja, Nov 24, 2009.

  1. #1
    Currently my blog does not have the "Previous posts" and "next posts" that is usually on the bottom of the list of posts in each category. How do I add this? Please help. :confused:
     
    Kaja, Nov 24, 2009 IP
  2. TruWebPro

    TruWebPro Peon

    Messages:
    55
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I'm sure many of us would be happy to help, Kaja, but a little more information will be needed. For starters, what platform is your blog on? Is it WordPress or something else? Would it be alright if we saw it?
     
    TruWebPro, Nov 24, 2009 IP
  3. Kaja

    Kaja Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yeah I'm using wordpress kajanova.com i'm using the Newstheme template wpthemedesigner.com/2009/01/13/news-theme/

    the website is new so not all the categories have more than 10 posts, but the uncategorized category does, but I can't figure out how to display the "Previous posts" link.

    thanks for your help
     
    Kaja, Nov 24, 2009 IP
  4. taminder

    taminder Peon

    Messages:
    581
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    <?php posts_nav_link(' | ', '&laquo; Next', 'Previous &raquo;'); ?>
    Code (markup):
    raquo = right-pointing arrow
    laquo = left-pointing arrow
     
    taminder, Nov 24, 2009 IP
  5. Kaja

    Kaja Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    How do I get it to say "Previous Posts"?
    And where do I place it? In the index.php, page.php, etc?
     
    Kaja, Nov 25, 2009 IP
  6. taminder

    taminder Peon

    Messages:
    581
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #6
    wherever in your template you want it. index.php works.

    <?php posts_nav_link(' | ', '&laquo; Next Post', 'Previous Post &raquo;'); ?>
    Code (markup):
    you can change that into anything you want. it's like this:

    <?php posts_nav_link('<divider>', '<text for next>', '<text for previous>'); ?>
    Code (markup):
    don't forget that if you use
    '
    Code (markup):
    make sure you put
    \
    Code (markup):
    in front of it like so:
    \'
    Code (markup):
    here's an example of what I mean:

    <?php posts_nav_link(' - ', '\'Next Post\'', '\'Previous Post\''); ?>
    Code (markup):
    the result will be:

     'Next Post' - 'Previous Post'
    Code (markup):
     
    taminder, Nov 25, 2009 IP
  7. taminder

    taminder Peon

    Messages:
    581
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #7
    sorry mod delete this post. accidentally did double.
     
    taminder, Nov 25, 2009 IP
  8. Kaja

    Kaja Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    thanks, that worked. but it only shows up on the main page. Is there anyway I can get it to show on the category pages?
     
    Kaja, Nov 25, 2009 IP