Skip to:
Content
Pages
Categories
Search
Top
Bottom

Preventing Posts from A Forum Showing in Latest Discussions

  • hi,

    I’m not using a latest discussion plugin, but want to prevent posts in a specific forum from showing in the latest discussions.

    how can I do this?

    cheers

    b

Viewing 1 replies (of 1 total)
  • sorry didn’t see this

    Possible to make certian forums not appear in latest discussion?

    the core bit of info posted in this thread below. this worked fine for me with BBPress 1.0.2:

    Just edit it to exclude whatever forum numbers you want and add it to the plug-ins folder.

    <?php
    /*
    Plugin Name: exclude
    */
    function filter_front_page_topics($where){
    $exclude_forums=array ("13","19"); // enable this to manually specify specific forums by id #
    // $forums = get_forums(); foreach ($forums as $forum) {if ($forum->forum_parent) {$exclude_forums[]=$forum->forum_id;}} // exclude ALL sub-forums
    if ( is_front() ) {foreach($exclude_forums as $forum) { $where.=" AND forum_id != ".$forum." "; }}
    return $where;
    }
    add_filter( 'get_latest_topics_where', 'filter_front_page_topics');
    add_filter( 'get_latest_posts_where', 'filter_front_page_topics');
    ?>

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