Skip to:
Content
Pages
Categories
Search
Top
Bottom

here's how to show super-stickies ("stick to front") also in their own forums


  • _ck_
    Participant

    @_ck_

    Here’s a mini-plugin I whipped up to fix the behavior of bbPress where a sticky that is made to “stick to front” (aka “super-stickies”) gets removed from its original forum.

    Instead, now it will show as a regular sticky in its original forum but also as a super sticky on the front page.

    <?php
    /*
    Plugin Name: Super Stickies Fix
    .................................................................................................................
    */
    function super_stickies_fix($where){return str_replace("topic_sticky = '1'","topic_sticky > 0",$where);}
    add_filter('get_sticky_topics_where','super_stickies_fix');
    ?>

    Tested in bbPress 0.9, in theory it should work fine also in bbPress 1.x

    You can remove the line of all dots, it’s just there to fix the wrap problem for code on bbpress.org 2.0

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