Info
- 9 posts
- 5 voices
- Started 4 years ago by kchila
- Latest reply from Phayze
- This topic is not resolved
Hiding Subforums on The Homepage
-
- Posted 4 years ago #
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 4 years ago #
perhaps... front-page.php? Just a hunch (without reading the thread)
-
- Posted 4 years ago #
I think more people have this problem?
will somebody please write a clear way to do this?
I don't get it either...
-
- Posted 4 years ago #
This is quick solution but not perfect. Find
<?php while ( bb_forum() ) : ?>infront-page.phpand 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 4 years ago #
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 4 years ago #
<?php global $forum; if ($forum->forum_parent == 0) forum_description(); ?>Quick explanation of the code: When
$forum'sforum_parentis0, that means$forumis a top-level forum; if not, it is a sub-forum of another forum whoseforum_idequals$forum'sforum_parent. -
- Posted 4 years ago #
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 4 years ago #
Here is a similar topic: http://bbpress.org/forums/topic/sub-sub-forums?replies=6
-
- Posted 4 years ago #
That's exactly what I was after - thanks.
-
You must log in to post.