Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: Front-page, Latest Discussions (Show/Hide posts from forums)


r-a-y
Participant

@r-a-y

Just looking at your code, it looks like you’re ending your “if” statement a little early.

Try this:

//Show latest discussions with all forums except id 17
<?php if ( $topics ) : foreach ( $topics as $topic ) : if( $topic->forum_id != 17 ) : ?>
<!-- your output stuff here -->
<?php endif; endforeach; endif; // $topics ?>

//Show latest discussions but only forum 17
<?php if ( $topics ) : foreach ( $topics as $topic ) : if( $topic->forum_id == 17 ) : ?>
<!-- your output stuff here -->
<?php endif; endforeach; endif; // $topics ?>

Not sure if that’s causing your problems… but try it out and see what happens.

Skip to toolbar