Wordpress help -- first page in category

Discussion in 'WordPress' started by RealityTVFan, Oct 5, 2008.

  1. #1
    Howdy good folks, hope I am posting this is the right section.

    What I would like to do is have a dynamic link to the first post in a category -- so when you click into say the 'Site News' category where the links for 'Next page' and 'Previous page' are there would also be a link for 'First page'.

    Is this possible with either a bit of code or a plugin? I've searched and searched but not been able to come up with any thing myself.

    Any help would be appreciated :)

    (using the latest version of WP if that is relevant)
     
    RealityTVFan, Oct 5, 2008 IP
  2. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #2
    WP-PageNavi and Pagebar are popular navigation plugins.

    I don't know of any tags for first and last posts, so you'd have to code something with WP_Query
     
    Cash Nebula, Oct 5, 2008 IP
  3. Houdy

    Houdy Peon

    Messages:
    267
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You can easily add the link to the blogs main page in the single.php file of the theme you are using. The code to edit should look like this:

    <?php previous_post_link('&laquo; %link') ?> <?php next_post_link('%link &raquo;') ?>
    PHP:
    Then just add the link to the blogs home page with either regular HTML or php between the previous post and next post code. something like this:

    <?php previous_post_link('&laquo; %link') ?> <a href="<?php echo get_option('home'); ?>/">Return to Homepage;</a> <?php next_post_link('%link &raquo;') ?>
    PHP:
     
    Houdy, Oct 6, 2008 IP
  4. Cash Nebula

    Cash Nebula Peon

    Messages:
    1,197
    Likes Received:
    67
    Best Answers:
    0
    Trophy Points:
    0
    #4
    The home page is often not the first page of posts in each category.
     
    Cash Nebula, Oct 6, 2008 IP
  5. RealityTVFan

    RealityTVFan Active Member

    Messages:
    234
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #5
    Thanks for the advice, I shall take a look at the links provided and see if I can get any to do what I want.

    I think I might have said it backwards or not fully explained though, because by 'first page' I actually mean the oldest page. So the page containing the very first post I made in that category.
     
    RealityTVFan, Oct 6, 2008 IP
  6. RealityTVFan

    RealityTVFan Active Member

    Messages:
    234
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #6
    PageNavi was perfecto, thanks so much :)
     
    RealityTVFan, Oct 6, 2008 IP