/ Published in: PHP
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.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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); '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');