Support Forum

Getting just groups to show on main page

MD Melissa Van Dam
Melissa Van Dam
Member

I am wondering if there is a way to get only the groups to show on the main forum page, and not all the forums withing the groups? It is fairly lengthy to be displayed all at once.

Thank you!

3 Answers

New Answer

MP Mr Papa
Mr Papa
Member

really?? what would users click on to get to the forums or topics?

but yeah sure…  its all about themes with 5.0 so you can do pretty much whatever you want…  you just need to edit your sp theme and the template files… first, make sure you create your own sp theme rather than use one of ours to not lose changes on updates…  http://codex.simple-press.com/codex/themes/theme-basics/creating-a-theme/

and then to do what you want, edit the spGroupView.php template file since that is the theme file that controls display on the main forum page…  and then remove the forum generation stuff…  in the default theme, it would start with:

                # Start the Forum Loop
                # ----------------------------------------------------------------------
                if (sp_has_forums()) : while (sp_loop_forums()) : sp_the_forum();

and then end with

                endwhile; else:
                    sp_NoForumsInGroupMessage('tagClass=spMessage', __sp('There are no forums in this group'));
                endif;

delete those and everything in between…  

give it a shot, but I suspect you won’t like it when all done and said, but its all about trial and error…

and with themes, you can custom the look how you want…

MD Melissa Van Dam
Melissa Van Dam
Member

I was thinking that they could click on the group to see the forums in the group, but I see that the group label is not a link, so that may not work. I was more looking for a way to shorten the list, as it is fairly long, but I don’t think I should remove any of the forums.

MP Mr Papa
Mr Papa
Member

well, you ‘could’ do that… just have to stray from the playbook a bit… wink

lets try this…

remove the code as I indicated before…

then in the same spGroupView.php file, find this code:

                sp_GroupHeaderName('tagClass=spHeaderName');

and try changing it to:

                echo '<div class="spHeaderName"><a href="'.add_query_arg('group', $spThisGroup->group_id, sp_url()).'">'.$spThisGroup->group_name.'</a></div>';

now… you probably wont like the link color on the group name which is now a link to the group’s list of forums… but see if you like it then we can work the link color…