Skip to:
Content
Pages
Categories
Search
Top
Bottom

subforum paging problem.


  • divyesh25
    Participant

    @divyesh25

    hi everyone,

    below is my forum structure.

    Forum A (type:category)
    Sub-forum A1 (type:forum)
    Sub-forum A2 (type:forum)
    Forum B (type:category)
    Sub-forum B1 (type:forum)
    Sub-forum B2 (type:forum).

    i am listing category and forum using below code.

    1)Forums Loop.

    <?php

    /**
    * Forums Loop
    *
    * @package bbPress
    * @subpackage Theme
    */

    ?>
    <?php do_action( ‘bbp_template_before_forums_loop’ ); ?>
    <?php if (!bbp_is_forum_category()) : ?>
    <?php do_action( ‘bbp_template_before_forums_index’ ); ?>
    <?php if ( bbp_has_forums() ) : ?>
    <table border=”0″ cellspacing=”0″ cellpadding=”0″ width=”100%”>
    <tr class=”subforum-titlebar”>
    <td valign=”middle” align=”left” class=”forums”><?php _e( ‘FORUMS’, ‘bbpress’ ); ?></td>
    <td valign=”middle” align=”center” class=”forums-topics”><?php _e( ‘TOPICS’, ‘bbpress’ ); ?></td>
    <td valign=”middle” align=”center” class=”forums-posts”><?php bbp_show_lead_topic() ? _e( ‘Replies’, ‘bbpress’ ) : _e( ‘POSTS’, ‘bbpress’ ); ?></td>
    <td valign=”middle” align=”left” class=”forums-lastposts”><?php _e( ‘LAST POSTS’, ‘bbpress’ ); ?></td>
    </tr>
    </table>
    <table border=”0″ cellspacing=”0″ cellpadding=”0″ width=”100%” class=”forum-border-lr”>
    <?php do_action( ‘bbp_template_before_forums_loop’ ); ?>
    <?php while ( bbp_forums() ) : bbp_the_forum(); ?>
    <?php bbp_get_template_part( ‘loop’, ‘single-forum’ ); ?>
    <?php endwhile; ?>
    <?php do_action( ‘bbp_template_after_forums_loop’ ); ?>
    </table>
    <?php else : ?>
    <?php bbp_get_template_part( ‘feedback’, ‘no-forums’ ); ?>
    <?php endif; ?>
    <?php do_action( ‘bbp_template_after_forums_index’ ); ?>
    <?php else: ?>
    <table border=”0″ cellspacing=”0″ cellpadding=”0″ width=”100%”>
    <tr class=”subforum-titlebar”>
    <td valign=”middle” align=”left” class=”forums” style=”text-transform:uppercase”>SUB-FORUMS: <?php _e(bbp_forum_title(), ‘bbpress’ ); ?></td>
    <td valign=”middle” align=”center” class=”forums-topics”><?php _e( ‘TOPICS’, ‘bbpress’ ); ?></td>
    <td valign=”middle” align=”center” class=”forums-posts”><?php bbp_show_lead_topic() ? _e( ‘Replies’, ‘bbpress’ ) : _e( ‘POSTS’, ‘bbpress’ ); ?></td>
    <td valign=”middle” align=”left” class=”forums-lastposts”><?php _e( ‘LAST POSTS’, ‘bbpress’ ); ?></td>
    </tr>
    </table>
    <table border=”0″ cellspacing=”0″ cellpadding=”0″ width=”100%” class=”forum-border-lr”>
    <?php if ( bbp_has_forums() ) : ?>
    <?php while ( bbp_forums() ) : bbp_the_forum(); ?>
    <?php bbp_get_template_part( ‘loop’, ‘single-forum’ ); ?>
    <?php endwhile; ?>
    <?php else : ?>
    <tr>
    <td><?php bbp_get_template_part( ‘feedback’, ‘no-forums’ ); ?></td>
    </tr>
    <?php endif; ?>
    </table>
    <?php endif; ?>
    <?php do_action( ‘bbp_template_after_forums_loop’ ); ?>

    ———————————————————————————————–

    2) Forums Loop – Single Forum

    <?php

    /**
    * Forums Loop – Single Forum
    *
    * @package bbPress
    * @subpackage Theme
    */

    ?>
    <tr class=”subforum-row blacktext12″ id=”bbp-forum-<?php bbp_forum_id(); ?>”>
    <td valign=”middle” align=”left” class=”forums forums-padding”>
    <div style=”float:left;”>/images/forum-add-icon2.png” width=”22″ height=”29″></div>
    <div class=”margin-left35″>
    <?php do_action( ‘bbp_theme_before_forum_title’ ); ?>
    <div>“><?php bbp_forum_title(); ?></div>
    <?php do_action( ‘bbp_theme_after_forum_title’ ); ?>
    <?php do_action( ‘bbp_theme_before_forum_description’ ); ?>
    <div><?php bbp_forum_content(); ?></div>
    <?php do_action( ‘bbp_theme_after_forum_description’ ); ?>
    </div>
    <div class=”clearboth”></div>
    </td>
    <td valign=”middle” align=”center” class=”forums-topics forums-padding”><?php bbp_forum_topic_count(); ?></td>
    <td valign=”middle” align=”center” class=”forums-posts forums-padding”><?php bbp_show_lead_topic() ? bbp_forum_reply_count() : bbp_forum_post_count(); ?></td>
    <td valign=”middle” align=”left” class=”forums-lastposts forums-padding”>
    <?php do_action( ‘bbp_theme_before_forum_freshness_link’ ); ?>
    <?php bbp_forum_freshness_link(); ?>
    <?php do_action( ‘bbp_theme_after_forum_freshness_link’ ); ?>
    </td>
    </tr>
    <tr>
    <td valign=’top’ align=’left’ colspan=”4″ class=”forums-topic-arrow”>
    <?php do_action( ‘bbp_theme_before_forum_sub_forums’ ); ?>
    <div class=”forums-topic”>
    <?php
    bbp_list_forums(array(
    ‘before’ => ‘<ul id=”bbp-forum-‘.bbp_get_forum_id().'” ‘.bbp_get_forum_class().’>’,
    ‘after’ => ”,
    ‘link_before’ => ‘<li class=”subforums-topics blacktext12″><div class=”circledarrow”></div>’,
    ‘link_after’ => ”,
    ‘separator’ => ”,
    ‘forum_id’ => ”,
    ‘show_topic_count’ => false,
    ‘show_reply_count’ => false,
    ), ‘list_forums’ );
    ?>
    </div>
    <?php do_action( ‘bbp_theme_after_forum_sub_forums’ ); ?>
    <?php bbp_forum_row_actions(); ?>
    </td>
    </tr>
    <tr><td colspan=”4″ class=”gray-border-bottom-1″></td></tr>
    ———————————————————————————————–

    i want to set paging in case of subforums. please help me i am new to bbpress.

    thanks.

Viewing 1 replies (of 1 total)
  • A massive copy and paste of your code is not helpful, no one wants to read a wall of code with no formatting, next time use the “code” button in the toolbar to wrap your code so it’s a little easier to read, also only post the specific parts of the code that is relevant.

    Either way, I’m closing this as a duplicate of your other post as that was readable and I’ve answered it. https://bbpress.org/forums/topic/pagination-on-forum-listing-page/

Viewing 1 replies (of 1 total)
  • The topic ‘subforum paging problem.’ is closed to new replies.
Skip to toolbar