Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: post count – 1

The problem with adding a filter is that you lose the function for counting the total amount of posts.

How can you convert nolageek code into a new function “topic_replies”? ;

<?php
function bb_decrement( $value ) {
return $value-1;
}
add_filter( 'get_topic_posts', 'bb_decrement', 1);
?>
<?php
function bb_decrement_topic( $value ) {
global $forum;
return $value;
}
function bb_decrement_forum( $value ) {
global $forum;
return $value-get_forum_topics();
}
add_filter( 'get_topic_posts', 'bb_decrement_topic', 1);
add_filter( 'get_forum_posts', 'bb_decrement_forum', 1);
?>

Skip to toolbar