WordPress.org

Making WordPress.org

Changeset 9377


Ignore:
Timestamp:
12/22/2019 03:12:45 PM (4 weeks ago)
Author:
SergeyBiryukov
Message:

Support Theme: Add subforum support to the front page archive view.

Props Clorith.
Fixes #4428.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-support/bbpress/loop-single-forum-homepage.php

    r7818 r9377  
    11<div id="bbp-forum-<?php bbp_forum_id(); ?>" <?php bbp_forum_class( bbp_get_forum_id(), array( '' ) ); ?>>
    2    
     2
    33    <a class="bbp-forum-title" href="<?php bbp_forum_permalink(); ?>" title="<?php bbp_forum_title(); ?>"><h3><?php bbp_forum_title(); ?></h3></a>
     4
    45    <p><?php bbp_forum_content(); ?></p>
    5     <p><a href="<?php bbp_forum_permalink(); ?>" title="<?php bbp_forum_title(); ?>" class="viewmore"><?php _e( 'View forum', 'wporg-forums' ); ?></a></p>
     6
     7    <p>
     8        <?php $subforums = bbp_forum_get_subforums( bbp_get_forum_id() ); ?>
     9
     10        <?php if ( $subforums ) : ?>
     11
     12            <?php foreach ( $subforums as $subforum ) : ?>
     13                <a href="<?php bbp_forum_permalink( $subforum->ID ); ?>" title="<?php bbp_forum_title( $subforum->ID ); ?>" class="viewmore"><?php bbp_forum_title( $subforum->ID ); ?></a><br>
     14            <?php endforeach; ?>
     15
     16        <?php endif; ?>
     17
     18        <?php if ( ! bbp_is_forum_category() ) : ?>
     19
     20            <a href="<?php bbp_forum_permalink(); ?>" title="<?php bbp_forum_title(); ?>" class="viewmore"><?php _e( 'View forum', 'wporg-forums' ); ?></a>
     21
     22        <?php endif; ?>
     23    </p>
    624
    725</div><!-- #bbp-forum-<?php bbp_forum_id(); ?> -->
Note: See TracChangeset for help on using the changeset viewer.