Skip to:
Content
Pages
Categories
Search
Top
Bottom

Go to last post in topic

Viewing 7 replies - 1 through 7 (of 7 total)
  • <?php
    /*
    Plugin Name: Page &raquo;
    Description: Adds &raquo; to the end of topic titles, linking to latest post.
    Author: fel64
    Version: 0.7
    */

    if (!function_exists('is_tags')) {
    function is_tags()
    {
    return is_tag();
    }
    }

    if (is_front() || is_forum() || is_tags()) {
    add_filter('topic_title', 'fel_addlatestlink', 101);
    }

    function fel_addlatestlink($title)
    {
    global $topic;
    $felgtlpl = get_topic_last_post_link($topic->topic_id);
    $title = $title . ' <a href="' . $felgtlpl . '">&nbsp;&raquo;&nbsp;</a>';

    return $title;
    }
    ?>

    That’ll add a little double arrow to the name of each topic which goes to the latest. :)


    airdrawndagger
    Member

    @airdrawndagger

    Thank you! I lost my password to the support forums in a computer crash but now I’m back to show my delayed gratitude :)

    How about a link to the second topic? So the first reply on a topic…


    citizenkeith
    Participant

    @citizenkeith

    I use this little plugin and my users love it. However, it stops working when using _ck_’s “Change Number of Front Page Topics” plugin.

    How to restrict number of Latest Discussions on front page

    Not sure which one is causing the problem, but thought it would be worth posting here, in case somebody wants to troubleshoot it.


    Sam Bauers
    Participant

    @sambauers

    0.9.0.1 has a link to the most recent post off the “freshness” column in the topic lists. See how that’s done in Kakumei and adjust your template accordingly.


    _ck_
    Participant

    @_ck_

    My educated guess would be because it’s grabbing the link within the title, the plugin that alters the page count is not getting unhooked yet.

    Try adding on a new line after global $topic;

    remove_action( 'bb_get_option_page_topics', 'bb_custom_topic_limit', 200);

    It’s occurred to me there might be a bug in my plugin where I don’t have that matching ,200 on the end of the same remove_action line. If I remember correctly, actions have to be unhooked with matching priority numbers to how they were added. So maybe try adding the ,200 also.

    Remember that bbPress’s “topics per page” setting must be set to the actual number of posts you want listed on a topic page.


    neo82
    Participant

    @neo82

    I searched a white with google, and yeah – now i found this post! But this doesn’t work… Can anyone help please?

    I use bbpress 2.5.3 and wordpress 3.8

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