1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Easy WP code assistance please

Discussion in 'Blogging' started by reinie, Oct 2, 2010.

  1. reinie

    reinie Elite Member

    Joined:
    Jan 16, 2009
    Messages:
    1,574
    Likes Received:
    1,040
    Hi guys
    I found it in the wordpress site but i don't understand how to insert it on all corresponding pages and "The loop". I keep getting errors.

    My WP template does not have a "next post" link at the bottom of the pages and I would like to insert it.

    Any help would be greatly appreciated.
    Thanks
    Reinie
     
  2. totaldeepak

    totaldeepak Newbie

    Joined:
    Nov 9, 2008
    Messages:
    17
    Likes Received:
    9
    Please read this..
    codex.wordpress.org/Next_and_Previous_Links
    alternatively you can use this wp plugin too "WP-PageNavi"
    google for it..
     
    Last edited: Oct 2, 2010
  3. reinie

    reinie Elite Member

    Joined:
    Jan 16, 2009
    Messages:
    1,574
    Likes Received:
    1,040
    Thanks for trying to help.
    But as i said...I already found it but its very confusing.

    I have tried the above method with no success...

    also, those plugins don't work if you dont have the original code to begin with
     
  4. Crixus

    Crixus Regular Member

    Joined:
    Jul 10, 2010
    Messages:
    409
    Likes Received:
    119
    Occupation:
    Jack of all trades, master of a couple.
    Location:
    the ludus
    If you are wanting to do this on "pages" vs. "posts" the coding and placement is different.
     
  5. reinie

    reinie Elite Member

    Joined:
    Jan 16, 2009
    Messages:
    1,574
    Likes Received:
    1,040
    Crixus
    I want to do it on posts
     
  6. promosirupiah

    promosirupiah Junior Member

    Joined:
    Jul 11, 2010
    Messages:
    149
    Likes Received:
    33
    add:
    PHP:
    <?php next_posts_link('« Previous Entries'?>
    <?php previous_posts_link
    ('Next Entries Â»'?>
    between some code like this:
    PHP:
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    and
    PHP:
    <?php endwhile; ?>
    on your archive.php index.php search.php single.php
     
  7. reinie

    reinie Elite Member

    Joined:
    Jan 16, 2009
    Messages:
    1,574
    Likes Received:
    1,040
    Thanks promosirupiah
    Unfortunately it still does not work...
    nothing is showing up on my page/post/index or archive pages
     
  8. promosirupiah

    promosirupiah Junior Member

    Joined:
    Jul 11, 2010
    Messages:
    149
    Likes Received:
    33
    maybe you'd like to try wp-pagenavi plugin to make it someting like this:

    page 1 of 10 | first page |1 2 3 4 ... |last page
    it need simple php code inserted on your footer
     
  9. reinie

    reinie Elite Member

    Joined:
    Jan 16, 2009
    Messages:
    1,574
    Likes Received:
    1,040
    Yep, tried it...does not work...
     
  10. Crixus

    Crixus Regular Member

    Joined:
    Jul 10, 2010
    Messages:
    409
    Likes Received:
    119
    Occupation:
    Jack of all trades, master of a couple.
    Location:
    the ludus
    Sounds like you may be using an older theme with some incompatibilities with the current version of WP.