Forum Replies Created
-
I ran into this code:`
<?php
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’); ?>`
No luck, pagination dissapeard with this code.When using shortcode bbp-topic-index with other shortcode (bbp-forum-index)pagination returning url is different than using topic-index by freshness.
=> with multiple shortcodes: ../forums/page/2/
=> with topics by freshness: ../forum/forumname/page/2/
How to solve this?In reply to: Paginate recent topcis pageThe default is 15, you can changes this in the forumsettings to what ever you like.
The shortcode doesn’t support a parameter.Any news on this?
using several shortcodes breaks the paginationfunction! I have these shortcodes:[bbp-forum-index] [tabs type="horizontal"] [tabs_head] [tab_title]Recente Topics[/tab_title] [tab_title]Ongelezen Topics[/tab_title] [tab_title]Zoeken[/tab_title] [/tabs_head] [tab][bbp-topic-index][/tab] [tab][bbp-single-view id="no-replies"][/tab] [tab][bbp-search-form][/tab] [/tabs]
Clicking on page2 gives a no resultpage!
In reply to: Reply count in widget Latest postsFixed, to everyone who it will be useful:
/ Verify the reply ID $topic_id = bbp_get_topic_id($widget_query->post->ID); $forum_id = bbp_get_reply_topic_id($topic_id); $reply_id = bbp_get_reply_id( $widget_query->post->ID ); $topic_count = bbp_get_forum_reply_count( $forum_id, false, true ); $total_reply_count = bbp_get_topic_reply_count($forum_id); $reply_link = '<a class="bbp-reply-topic-title" href="' . esc_url( bbp_get_reply_url( $reply_id ) ) . '" title="' . esc_attr( bbp_get_reply_excerpt( $reply_id, 50 ) ) . '">' . bbp_get_reply_topic_title( $reply_id ) . '</a> ('.$total_reply_count.')<br />'. esc_attr( bbp_get_reply_excerpt( $reply_id, 40 ) ) . '';