bbPress

Simple, Fast, Elegant

bbPress support forums » Installation

Hiding Subforums on The Homepage

(9 posts)
  • Started 1 year ago by kchila
  • Latest reply from Phayze
  • This topic is not resolved

Tags:

  1. kchila
    Member

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

    http://bbpress.org/forums/topic/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

    Posted 1 year ago #
  2. nolageek
    Member

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

    Posted 1 year ago #
  3. warmechoco
    Member

    I think more people have this problem?

    will somebody please write a clear way to do this?

    I don't get it either...

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

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

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

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

    Posted 1 year ago #
  8. Here is a similar topic: http://bbpress.org/forums/topic/sub-sub-forums?replies=6

    Posted 1 year ago #
  9. That's exactly what I was after - thanks.

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.