• there has GOT to be a bit of code to link to a latest post in a category or to all categories!

    like <php?> word press code </php>

    which would generate something like this:

    CLICK HERE FOR LATEST POST

    or maybe some code I can put into the herf tag.

    There is code for next post, previous post, first post but what of LATEST post?!

    I’ve been looking for weeks!

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter siounis

    (@siounis)

    moshu, i tried that exact wording at the start.

    all those search results tell you how to display the most recent post.

    but whats the code to link directly to the most recent post?

    From where? I mean to link from where? Where do you want that link?
    Vague questions get vague answers…

    Thread Starter siounis

    (@siounis)

    ok, from anywhere really. but i guess if I had to chose from the header.

    Simply, I want to be able to have the word “LATEST POST” link to the latest post. And not link to the category page which lists all the post, but to actual post.

    A practical use of this is a webcomic. Having links

    FIRST, PREV, NEXT, NEW

    I know the code for the first three but what php code generates, or what code do i add to the herf to have NEW link to the latest post in a category.

    I also found a hack by using a pulgin that list the recent posts in a category to list the name of the post, but like I said having it a link.

    Look at this webpage.
    http://www.penny-arcade.com/comic

    they dont use wordpress.

    but I looked everywhere and found some other threads asking for the same thing:

    http://wordpress.org/support/topic/87469?replies=3

    http://wordpress.org/support/topic/116731?replies=1

    i hope this is clear enough for you moshu. you’re my only hope!

    Thread Starter siounis

    (@siounis)

    πŸ™

    I don’t think there is a “pre-made” code (aka template tag) for something like that. Sorry.

    Hmm, sounds familiar.

    http://trac.wordpress.org/ticket/3876

    Oh well…

    Thread Starter siounis

    (@siounis)

    im confused, on http://trac.wordpress.org/ticket/3876 people offer some solutions, but i dont know enough about wordpress to understand them.

    are those solutions offered on the link that drmike posted actual solutions? cause if they are- hot diggidy!

    I’m sorry this is so late, but you could do something like this:

    <?php query_posts('showposts=1'); ?>
    	<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
        <a href="<?php the_permalink() ?>">Click here for latest post</a>
    	<?php endwhile; endif; ?>
    veevee

    (@veevee)

    Hmmm, that’s really really close evaneckard, but for some reason, when I pasted this code in, my prev post, next post calls stopped generating links, and now ALL of my permalinks link to the latest posts. A fix anyone. I would also love it if anyone knew how to make this link to the most recent post in a specific category.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘link to latest post’ is closed to new replies.