Revision: 57500
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at May 29, 2012 19:48 by kristarella
Initial Code
function fix_pagination($args) {
global $wp_query,$bbp;
$max_pages = $bbp->topic_query->max_num_pages;
$page = $bbp->topic_query->paged;
$mybase = get_permalink($wp_query->post->ID);
$args = array (
'base' => $mybase.$wp_rewrite->pagination_base.'/%#%/',
'format' => '',
'total' => $max_pages,
'current' => $page,
'prev_text' => '←',
'next_text' => '→',
'mid_size' => 1
);
return $args;
}
add_filter('bbp_topic_pagination','fix_pagination');
Initial URL
Initial Description
For some reason bbPress seems to use the base domain name (rather than the current forum) as the URL to which it appends /page/2 (for example) in its pagination. This seems to fix it.
Initial Title
Fix bbPress pagination
Initial Tags
Initial Language
PHP