some problems with showing topics..
-
I have made a front-page where i show off all latest topics matching the forum ID’s..
It looks like this.
Forum id = General questions -> latest topics of the general questions
Forum id = Support questions -> latest topics of the support questions
I did this by hiding or deleting the forum id’s from all others and repeat the latest topics section.
Like this.
‘
<table id=”latest” role=”main”>
<tr>
<th><?php _e(‘Topic’); ?> — <?php bb_new_topic_link(); ?></th>
<th><?php _e(‘Posts’); ?></th>
<!– <th><?php _e(‘Voices’); ?></th> –>
<th><?php _e(‘Last Poster’); ?></th>
</tr>
<?php if ( $stickies ) : foreach ( $stickies as $topic ) : ?>
<tr<?php topic_class(); ?>>
<td><?php bb_topic_labels(); ?> <big>“><?php topic_title(); ?></big><?php topic_page_links(); ?></td>
<td class=”num”><?php topic_posts(); ?></td>
<!– <td class=”num”><?php bb_topic_voices(); ?></td> –>
<td class=”num”><?php topic_last_poster(); ?></td>
</tr>
<?php endforeach; endif; ?>
<?php if ( $topics ) : foreach ( $topics as $topic ) : ?>
<?php if( $topic->forum_id != 4 ) { ?>
<?php if( $topic->forum_id != 5 ) { ?>
<?php if( $topic->forum_id != 6 ) { ?>
<tr<?php topic_class(); ?>>
<td><?php bb_topic_labels(); ?> “><?php topic_title(); ?><?php topic_page_links(); ?></td>
<td class=”counter”><?php topic_posts(); ?></td>
<!– <td class=”num”><?php bb_topic_voices(); ?></td> –>
<td class=”last-post-avatar”><?php echo bb_get_avatar( $topic->topic_last_poster , ’36’); ?></td>
</tr>
<?php } ?>
<?php } ?>
<?php } ?>
<?php endforeach; endif; ?>
</table>
<table id=”latest” role=”main”>
<tr>
<th><?php _e(‘Topic’); ?> — <?php bb_new_topic_link(); ?></th>
<th><?php _e(‘Posts’); ?></th>
<!– <th><?php _e(‘Voices’); ?></th> –>
<th><?php _e(‘Last Poster’); ?></th>
</tr>
<?php if ( $stickies ) : foreach ( $stickies as $topic ) : ?>
<tr<?php topic_class(); ?>>
<td><?php bb_topic_labels(); ?> <big>“><?php topic_title(); ?></big><?php topic_page_links(); ?></td>
<td class=”num”><?php topic_posts(); ?></td>
<!– <td class=”num”><?php bb_topic_voices(); ?></td> –>
<td class=”num”><?php topic_last_poster(); ?></td>
</tr>
<?php endforeach; endif; ?>
<?php if ( $topics ) : foreach ( $topics as $topic ) : ?>
<?php if( $topic->forum_id != 3 ) { ?>
<?php if( $topic->forum_id != 4 ) { ?>
<?php if( $topic->forum_id != 6 ) { ?>
<tr<?php topic_class(); ?>>
<td><?php bb_topic_labels(); ?> “><?php topic_title(); ?><?php topic_page_links(); ?></td>
<td class=”counter”><?php topic_posts(); ?></td>
<!– <td class=”num”><?php bb_topic_voices(); ?></td> –>
<td class=”last-post-avatar”><?php echo bb_get_avatar( $topic->topic_last_poster , ’36’); ?></td>
</tr>
<?php } ?>
<?php } ?>
<?php } ?>
<?php endforeach; endif; ?>
</table>’
But know i have a problem with using this plugin.
http://bbpress.org/plugins/topic/front-page-topics/
I only want to show the latest 5 topics of each forum ID (excluding the once i’m hiding)
Know with this plugin it also counts the topics i’m hiding..
Isn’t there some code that says: show only the latest 5 topics from forum ID 3
Thanks,
- You must be logged in to reply to this topic.