Skip to:
Content
Pages
Categories
Search
Top
Bottom

Request: Topic title link to latest post

  • I was thinking a plugin that when you click on the topic title in the “Latest Discusison” section, it takes you to the last post, or the last unread post by you (which I think would require cookies, I don’t know much about that). I’m sure you have seen this on forums like IPB or phpBB, you click on the topic title, and it takes you to the last unread post. This would be good for threads which have more than one page, so that once you go to the thread, you then won’t have to navigate to the correct page.

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

  • thomasklaiber
    Member

    @thomasklaiber

    I think there is no plugin needed for this. It only requires a small template change in front-page.php.

    Just replace in line 37:

    topic_link();

    with

    echo get_topic_last_post_link($topic->topic_id);

    … I think it should work.

    thanks :)


    chrishajer
    Participant

    @chrishajer

    Works for me too. Now to do something like “WP Since Last Visit” from Alex King.

    Also, I made the same change in forum.php on lines 16 and 25 for consistency.

    edit: Oops, just looked through the files and that need to be changed in lots of places. I lost track already…

    ok you have to edit these pages:

    front-page.php

    forum.php

    tag-single.php

    just three files not much.

    edit those pages with what mriannnnn?

    By the way, chrishajer, I only did this on the front page by adding an image that they can click on to take them to the latest post, or if they dont want to go to the latest post, click on the topic title. You can see it on my site, it’s the clipboard image that takes to the latest post.

    This trick doesn’t work if the latest post is on page 2+…ideas how to get around that?


    akyboy
    Participant

    @akyboy

    Hi Guys,

    I would like to see link to last post in my Forum Widget but i cannot figure out.

    This is the code for widget i use:

    <!-- This file is used to markup the widget for Recent Topics info -->
    <table><!-- AKKI - dodao alajment left AUG 22 2014 -->
        <tr align="left">
        	<th>Topics</th>
        	<th>Posts</th>
        </tr>
    
        <?php while ( $widget_query->have_posts() ) :
                	  $widget_query->the_post();
                      $topic_id    = bbp_get_topic_id( $widget_query->post->ID );
     	?>
        <tr>
        	<td>
                <a class="bbp-forum-title" href="<?php bbp_topic_permalink( $topic_id ); ?>"><?php bbp_topic_title( $topic_id ); ?></a>
            </td>
            <td>
            	<?php echo bbp_get_topic_post_count($topic_id, false);?>
            </td>
        </tr>
        <?php endwhile; ?>
    </table>

    If you can please tell me what should i replace to get link to last post on my forums?

    Thanks

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.
Skip to toolbar