Forum Replies Created
-
Thanks will defiantly look into fucntions.bb-templete.php i appreciate you help.
@psycheangels just add some more filters to
if ( $posts ) {
$out = $posts[0]->post_text;
$out = strip_tags( $out );Like this one
$out = str_replace( '<br />', '', $out );
there might be an easier way but im still learning.
I should have pointed out im still learning php and bbpress functions still mystify me but thanks Kawauso for cleaning up the code i appreciate it.
For those that are interested I found this.
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’);
?>
Sorry im still confused where did you insert
$topics = get_latest_topics(‘forum=-3’);
in functions.bb-topics.php
or front-page.php