Skip to content

Instantly share code, notes, and snippets.

@ntwb
Last active October 11, 2015 03:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ntwb/3797945 to your computer and use it in GitHub Desktop.
Save ntwb/3797945 to your computer and use it in GitHub Desktop.
bbPress - Custom Forum List
<?php
/*
Plugin Name: bbPress - Customised forum list arguments
Plugin URI: https://gist.github.com/ntwb/3797945
Description: bbPress - Customised forum list arguments
Version: 0.3
Author: Stephen Edgar - Netweb
Author URI: http://netweb.com.au
*/
add_filter('bbp_before_list_forums_parse_args', 'ntwb_bbpress_list_forums' );
function ntwb_bbpress_list_forums() {
$args['before'] = '<ul class="bbp-forums-list">';
$args['after'] = '</ul>';
$args['link_before'] = '<li class="bbp-forum">';
$args['link_after'] = '</li>';
$args['count_before'] = ' (';
$args['count_after'] = ')';
$args['count_sep'] = ', ';
$args['separator'] = ', ';
$args['forum_id'] = '';
$args['show_topic_count'] = true;
$args['show_reply_count'] = true;
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment