Skip to:
Content
Pages
Categories
Search
Top
Bottom

Not latest reply link, but first reply link?

  • Hi,

    Another question. When watching a topic you see this first:

    Topic title

    Started 1 month ago by xxx

    Latest reply from xxx

    This topic is not a support question

    Add this topic to your favorites (?)

    Now I want to change this a bit so that the latest reply doesnt go to the latest reply, but to the first reply (so with long topics I don’t have to scroll down to the fist reply) so it’s gonna look like this:

    Topic title

    Started 1 month ago by xxx

    First reply from xxx

    Latest reply from xxx

    This topic is not a support question

    Add this topic to your favorites (?)

    Any ideas?

    Null

Viewing 8 replies - 1 through 8 (of 8 total)
  • -bump-


    ardentfrost
    Member

    @ardentfrost

    just find where it is and add this:

    <a href="<?php topic_link(); ?>">First Post</a>

    This gives me the first post, not the first reply of that post (if I am not wrong) I want to jump to the first reply

    (sorry if this does this, but I cant test it right now)

    Thx


    ardentfrost
    Member

    @ardentfrost

    That’s a bit more difficult. You’ll have to figure out how to find the post id for the second post in the topic and call post_link( $post_id ) to fill out the the link.

    Yeah, thats why I ask that here :) I have no clue how to do that!

    -bumpy-

    Any other ideas?

    Okay I have an idea, it is possible (with a plugin) to add an anchor as soon as some one adds a first reply?

    So when replying, it checks first if there is 1 post in the topic. If it is, it adds a anchor (or get its anchor) if it isnt (there are 0 or >2 more posts) it does nothing. Then it can generate a first-reply link…

    Well in theory…

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

You must be logged in to reply to this topic.