Forums

Join
bbPress Support ForumsTroubleshootingSubforums on frontpage -- fel64?

Info

Tags

Subforums on frontpage -- fel64?

  1. I don't want my subforums to showup on frontpage as in http://bbpress.org/forums/topic/subforums-and-markup?replies=12

    I tried fel64's recommendation:
    <?php foreach( $forums as $forum ) : ?>
    //blaaaaah HTML
    <?php endforeach; ?>
    to this sort of thing:

    <?php foreach( $forums as $forum ) :
    if( !$forum->forum_parent ) { ?>
    //blaaaaaah HTML
    <?php }
    enforeach; ?>

    I get an error on line 60,
    Parse error: syntax error, unexpected T_ELSE in front-page.php on line 60

    Line 60 writes
    <?php endif; else : // $forums ?>

  2. Oh hey. I think the colon syntax works so that the endif comes after all of it, including the else statements. So just try removing the endif;. If that gets unexpected results, can you copy the entire code for that file to http://pastebin.com/ and link it here for me to look at please? In fact, might be best to do that anyway just to make sure.

  3. http://pastebin.com/m50e22a18

  4. Changed the div position.

    I get a different error now:
    Parse error: syntax error, unexpected $end in front-page.php on line 73

  5. Removed a (probably) unnecessary if statement. Give this one a shot: http://pastebin.com/m5eb1069a - sorry!

  6. A different error this time.
    Parse error: syntax error, unexpected T_ELSE in front-page.php on line 60

  7. No idea to be honest. Bloody colon syntax. Play around with it until it works.

  8. Line 55 has a typo:

    enforeach; ?>

    should be

    endforeach; ?>

    That takes care of the syntax error on line 60. I have no idea if the plugin works after that correction though.

  9. That cured the error problem! Thank you ChrisHajer and Fel64.

  10. Yeah, cheers Chris for finding that one. :)

  11. You must log in to post.