WordPress.org

Ready to get started?Download WordPress

Forums

first 1 2 3 4 ... 10 last - navigation bar (12 posts)

  1. ganzua
    Member
    Posted 6 years ago #

    Is it possible to code this kind of navigation bar?

    first 1 2 3 4 ... 10 last

  2. Indojepang
    Member
    Posted 6 years ago #

  3. ganzua
    Member
    Posted 6 years ago #

    Thanks for the suggestion ideojepang;

    Tried the plugin but all that I get is a navegation menu like this one;

    Next Item: [link to my next post]
    Previous item: [link to my previous post]
    Back to the Front Page

    ???

    Perhaps is that I'm using %postname% permalinks

  4. mylife64
    Member
    Posted 6 years ago #

    You can try this one.

  5. ganzua
    Member
    Posted 6 years ago #

    Thanks mylife64 :)

    It didn't work.

    Perhaps I should say that I'm using index.php as a cms where I just display what's new on the web and just an excerpt of the last post.

    On my web you navigate from single post to single post because all entries are large articles.

    Currently, from my index.php you can only go to the last post by clicking "the more".

    From the single last entry you can navigate from single to single post with;

    '
    <div class="alignleft"><?php previous_post_link('« %link')?></div>
    <div class="alignright"><?php next_post_link('%link »') ?></div>
    '

    I'd like to implement a navigation bar 1,2,3 ... for my index.php and my single.php templates.

    Perhaps it is too complicated, isn't it?

  6. Indojepang
    Member
    Posted 6 years ago #

    you have to read the readme file to use it.. read it first.
    put <?php paged_menu(); ?> in your template file

  7. ganzua
    Member
    Posted 6 years ago #

    I did use <?php paged_menu(); ?> inside the loop in single.php template and this is exactly what I get;

    Next Item: [link to my next post]
    Previous item: [link to my previous post]
    Back to the Front Page

  8. Ivovic
    Member
    Posted 6 years ago #

    it's not too complicated, it's just not what the single page is for.

    the navigation plugins display a paged index the way you want, but single posts are not paged indexes so they don't work that way at all.

    for my page numbers, I use wp_pagenavi from here: http://lesterchan.net/portfolio/programming.php

    again, single posts are not counted as pages of a larger unit.. they stand alone.

    If you like, you can display a single post on your category pages, or your monthly archives or something, then each post will be one page of the archive.... which is NOT the same as a single post, but will look quite similar.

  9. ganzua
    Member
    Posted 6 years ago #

    Hi Ivovic;

    I tried the lesterchan plugin before I opened this thread and it didn't work for me either.

    "single posts are not paged indexes so they don't work that way at all."

    but I can navigate from post to post with these functions;

    '
    <?php previous_post_link('« %link')?>
    <?php next_post_link('%link »') ?>
    '

    I you can define a function to fetch the link to previous and next post, perhaps somebody figured out how to paginate all the posts in the way I wanted. All posts have an id and a date.

  10. Ivovic
    Member
    Posted 6 years ago #

    I'm sure what you want is possible - but it's not the normal way to use single posts, so you may have trouble finding it.

    I wish you luck, of course.

  11. Bernard Bos
    Member
    Posted 6 years ago #

    I use this plugin: Page Numbers and really like it.

  12. ganzua
    Member
    Posted 6 years ago #

    Thanks for the suggestion Bossy :)

    It didn't work with my single php. Probably there isn't a plugin like the one I need.

Topic Closed

This topic has been closed to new replies.

About this Topic