• I am currently using WP1.2.1 and I am wondering how to put a link that links to pages with older posts. I have my site set to 10 entries on the index page, so I want links to the older pages. Then on the older pages, i would like to have links to even older pages, or newer pages, and a Home page link. Is that possible and what code would i need???? I saw some post earlier on that, and a buch of code, but i need more help and explanation as to where to put the code that you provide me.

    Thanks for the help!!

    +Cypress

Viewing 11 replies - 1 through 11 (of 11 total)
  • Have a look at my site – that what you want ?

    (Click my name)

    Moderator James Huff

    (@macmanx)

    Thread Starter cypress

    (@cypress)

    Yes, that is what I want to have on my site, plus maybe a link to the home page/index, but what you have on your site is just fine for me. Can you please tell me how to do it???? (PODZ)

    (I’m using 1.5, but this has worked on my site since 1.2)
    Here we go….wrong way round first:

    When a single page is viewed, you see this at the top:
    Previous Story> > || Home || < <Next Story

    Code:
    <?php if ($single) { ?>
    <div class="cent">
    <?php previous_post('%', '', 'yes', 'no', 1, '') ?>
    > > || <a href="https://www.tamba2.org.uk/T2" title="Home">Home</a> || < <<?php next_post('%', '', 'yes', 'no', 1, '') ?>
    <br />
    <br />
    </div>
    <?php } ?>

    That code gets put directly above this line:
    <div class="post">

    You can of course change the symbols.

    ======================

    The navigation at the base of the page:
    You must have ‘posts paged’ selected in Options – it will not work otherwise.
    Put these lines at the bottom of the post div.

    <div class="left"><?php posts_nav_link('','?? Newer Posts','') ?></div>
    <div class="right"><?php posts_nav_link('','','Older Posts ??') ?></div>

    The function name could have changed between 1.2.1 and 1.5 though …… post back if you have problems, though I thought Kubrick had this built in.

    I have 1.2.2 or 1.2.1 whichever, I mean both on different sites, don’t recall what is what, with more than 2 installs right now …

    In any case, I don’t have mod_rewrite and have chosen to have pretty urls via appending the virtul site structure onto the url.

    so it’s

    index.php/archives/…

    but this and every other page pagination won’t work right ….

    Clicking on the “older posts” appends a ‘?’ to ‘index.php’ which makes this non-effective for my use ??

    What do I need to HACK, where and what exactly, to fix this problem?

    What file? I can do some PHP stuff, but don’t know where to look, and if it’s complicated I’m toast.

    ??

    .::BUMP::.

    I’m still looking for help on the above!

    @podz: thanks, this works very well! Perhaps a stuppid question…. is there a way to change the font/layout of the text? What should I change in the .css file? Many thanks!

    @michiel:
    Yes – the best way to do that would be to enclose all of that inside a div, then style it:

    <div class="navigation">
    ---the stuff above---
    </div>

    And in the css:
    .navigation {
    font-family: ….
    color: …
    }

    Ah:-) of course! Thanks!!!

    I was able to get the newer posts, older posts bit above to work on my wp 1.2 site, but the top version doesn’t.

    No errors show, and neither does the navigation.

    edit: Hmm. It shows on my testblog… but not my public blog.

    I even uploaded the index.php file from my test blog to my public blog.

    the public blog is at:

    my warcraft blog

    It works on the test, but not the public. I checked and both have the same plugins. The home link is there, but not the next previous posts. I have the posts shown set at 1.

    Any suggestions ?

    Never mind. I got the lesterchan.net page nav to work on my site.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Next page link and previous page link’ is closed to new replies.