Skip to:
Content
Pages
Categories
Search
Top
Bottom

Hiding Subforums on The Homepage

  • I am looking to do the exact same thing that has been done in this forum:

    subforums and markup

    I want to hide the sub-forums from being shown in the homepage because they take up a lot of space, but I simply don’t get it. When it says edit the templates so this looks like this. Which file in the template do I edit. I would greatly appreciate it if someone could explain how to do this.

    Thanks,

    K

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

  • Nola1974
    Participant

    @nolageek

    perhaps… front-page.php? Just a hunch (without reading the thread)


    warmechoco
    Member

    @warmechoco

    I think more people have this problem?

    will somebody please write a clear way to do this?

    I don’t get it either…


    livibetter
    Member

    @livibetter

    This is quick solution but not perfect. Find <?php while ( bb_forum() ) : ?> in front-page.php and replace it with

    <?php while ( bb_forum() ) : global $forum; if ($forum->forum_parent != 0) continue;?>

    It only hides the subforums, so visitors have to click on a top level forum to see if there is any subforum within the top level forum.


    phayze
    Member

    @phayze

    I have a different, but related problem – I only want to hide the descriptions for the sub forums on the homepage, not the whole table row. What if statement do I wrap around <?php forum_description(); ?> to do that?


    livibetter
    Member

    @livibetter

    <?php global $forum; if ($forum->forum_parent == 0) forum_description(); ?>

    Quick explanation of the code: When $forum‘s forum_parent is 0, that means $forum is a top-level forum; if not, it is a sub-forum of another forum whose forum_id equals $forum‘s forum_parent.


    phayze
    Member

    @phayze

    Ahhh… great, thanks. Next question, just about on topic, has anyone modified their front page bb_forum() loop so that sub-forums appear like they do on http://www.avforums.com/forums/index.php – just the title, but in the same row as the parent?

    Thanks,


    livibetter
    Member

    @livibetter


    phayze
    Member

    @phayze

    That’s exactly what I was after – thanks.

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