• Resolved Arnoud

    (@derice)


    I would like to add a “Previous” and “Next” link below my multi paged posts/pages.

    Currently it’s like this:
    Pages: 1 2 3 4 5 6 7 8 9
    Used code:
    <?php link_pages('<p><strong>' . __('Pages:') . '</strong> ', '</p>', 'number'); ?>

    I would like it to look like this:

    << Previous Page | 1 2 3 4 5 6 7 8 9 | Next Page >>
    (Current page should be in bold)

    I’ve found this article:
    http://codex.wordpress.org/Styling_Page-Links
    But I can’t seem to make it work.

    Is there someone who would like to help me out with this?

Viewing 10 replies - 16 through 25 (of 25 total)
  • Thread Starter Arnoud

    (@derice)

    I rather have something that works before styling.
    Still need to figure out why the Next/Previous don’t show up consistant.

    CSS isn’t a problem for me, PHP is. πŸ˜‰

    hotkee

    (@hotkee)

    What is your site url?

    Thread Starter Arnoud

    (@derice)

    The site/page I am working on is:
    http://www.arnoudraeven.nl/?page_id=248

    hotkee

    (@hotkee)

    So this is a page and you are trying to go paginate the pages.

    Why do you need it to be pages, could posts not work for the purpose?

    hotkee

    (@hotkee)

    Also I am seeing something like this

    Volgende Pagina
    1 2 3 4 5
    Vorige PaginaNext Page

    What does Volgende Pagina mean, can you paste your code. Next Page is appearing it seems, not Previous Page.

    Thread Starter Arnoud

    (@derice)

    If you examine the rest of the site, you will see that it exists of mainly travel blogs. These blogs contain a page per day.

    I want to be able to select individual pages (as it is now) and to be able to click on a line of text that states: Previous Page / Next Page.
    This so visitors can navigate easier through the stories, I received some comments on it, people find it tricky to click on just the number to advance to the next chapter.

    Thread Starter Arnoud

    (@derice)

    Volgende Pagina is Dutch, it’s translated automatically by gettext & a .mo file.
    (See the language option on the right hand side of the site).

    Volgende Pagina means Next Page
    Vorige Pagina means Previous Page

    Code that is currently generating the page navigation:

    <?php
    wp_link_pages(‘before=<div class=”next”>&after=</div>&next_or_number=next&previouspagelink=« Previous Page’);
    wp_link_pages(‘before=<div class=”number”>&after=</div>&next_or_number=number’);
    wp_link_pages(‘before=<div class=”next”>&after=</div>&next_or_number=next&nextpagelink=Next Page »’);
    ?>

    Thread Starter Arnoud

    (@derice)

    These lines of code are in my template in a file called “page.php”

    hotkee

    (@hotkee)

    Try this, it will work

    <?php wp_link_pages('before=<p>&after=</p>&next_or_number=text&previouspagelink=Previous Page&nextpagelink='); ?>
     | <?php wp_link_pages('before=<p>&after=</p>&next_or_number=number'); ?>|
    <?php wp_link_pages('before=<p>&after=</p>&next_or_number=text&nextpagelink=Next Page&previouspagelink='); ?>

    You will have to style yourself.

    Thread Starter Arnoud

    (@derice)

    Marvellous!
    Thanks so much! πŸ™‚ πŸ™‚
    You just made my day!!!

Viewing 10 replies - 16 through 25 (of 25 total)

The topic ‘Previous/Next below posts/pages’ is closed to new replies.