bbPress

Simple, Fast, Elegant

bbPress support forums » Troubleshooting

Subforums on frontpage -- fel64?

(11 posts)
  • Started 1 year ago by kannued
  • Latest reply from fel64
  • This topic is resolved

Tags:

  1. kannued
    Member

    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 ?>

    Posted 1 year ago #
  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.

    Posted 1 year ago #
  3. kannued
    Member

    http://pastebin.com/m50e22a18

    Posted 1 year ago #
  4. http://pastebin.com/m444620c

    Posted 1 year ago #
  5. kannued
    Member

    Changed the div position.

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

    Posted 1 year ago #
  6. Removed a (probably) unnecessary if statement. Give this one a shot: http://pastebin.com/m5eb1069a - sorry!

    Posted 1 year ago #
  7. kannued
    Member

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

    Posted 1 year ago #
  8. No idea to be honest. Bloody colon syntax. Play around with it until it works.

    Posted 1 year ago #
  9. 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.

    Posted 1 year ago #
  10. kannued
    Member

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

    Posted 1 year ago #
  11. Yeah, cheers Chris for finding that one. :)

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.