Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: subforums and markup


_ck_
Participant

@_ck_

If you mean so topics in sub-forums do not show up on “latest discussions” I whipped this up to solve that:

function filter_front_page_topics($where){
// $exclude_forums=array ("8"); // 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');

Skip to toolbar