Subhransu (@subhransuwp)

Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)

  • Subhransu
    Participant

    @subhransuwp

    Thank u for posting, sure i am updating my solution,

    I have used one hook to customize the topic pagination link. I was the issue with the total number of topic count as per my requirement.

    function ntwb_bbpress_custom_pagination( $args ) {

    $topic_per_page = bbp_get_topics_per_page();
    $ttt = bbp_get_forum_id();
    $total_topic = custom_forum_topic_count($ttt); //get your topic count as your requirement[This is my own function]
    $total = ( $topic_per_page === $total_topic ) ? 1 : ceil( (int) $total_topic / (int) $topic_per_page );

    $args[‘total’] = $total;
    return $args;
    }
    add_filter( ‘bbp_topic_pagination’, ‘ntwb_bbpress_custom_pagination’ );


    Subhransu
    Participant

    @subhransuwp

    I got my answer, so no need to reply this topic

Viewing 2 replies - 1 through 2 (of 2 total)