Info
- 11 posts
- 3 voices
- Started 4 years ago by kannued
- Latest reply from fel64
- This topic is resolved
Subforums on frontpage -- fel64?
-
- Posted 4 years ago #
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 60Line 60 writes
<?php endif; else : // $forums ?> -
- Posted 4 years ago #
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 4 years ago #
-
- Posted 4 years ago #
-
- Posted 4 years ago #
Changed the div position.
I get a different error now:
Parse error: syntax error, unexpected $end in front-page.php on line 73 -
- Posted 4 years ago #
Removed a (probably) unnecessary if statement. Give this one a shot: http://pastebin.com/m5eb1069a - sorry!
-
- Posted 4 years ago #
A different error this time.
Parse error: syntax error, unexpected T_ELSE in front-page.php on line 60 -
- Posted 4 years ago #
No idea to be honest. Bloody colon syntax. Play around with it until it works.
-
- Posted 4 years ago #
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 4 years ago #
That cured the error problem! Thank you ChrisHajer and Fel64.
-
- Posted 4 years ago #
Yeah, cheers Chris for finding that one. :)
-
You must log in to post.