Skip to:
Content
Pages
Categories
Search
Top
Bottom

Subforums on frontpage — fel64?


  • kannued
    Participant

    @kannued

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

Viewing 10 replies - 1 through 10 (of 10 total)

  • fel64
    Member

    @fel64

    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.


    kannued
    Participant

    @kannued


    fel64
    Member

    @fel64


    kannued
    Participant

    @kannued

    Changed the div position.

    I get a different error now:

    Parse error: syntax error, unexpected $end in front-page.php on line 73


    fel64
    Member

    @fel64

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


    kannued
    Participant

    @kannued

    A different error this time.

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


    fel64
    Member

    @fel64

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


    chrishajer
    Participant

    @chrishajer

    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.


    kannued
    Participant

    @kannued

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


    fel64
    Member

    @fel64

    Yeah, cheers Chris for finding that one. :)

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.
Skip to toolbar