Notifications
Clear all

Limited Support

Our support team is currently on holiday from December 25, 2025 to January 7, 2026, and replies may be delayed during this period.

We appreciate your patience and understanding while our team is away. Thank you for being part of the wpForo community!

Merry Christmas and Happy Holidays! 🎄

wpForo 1.x.x [Closed] Modify class-template.php to hide menu options/pages

5 Posts
2 Users
0 Reactions
2,626 Views
Posts: 11
Topic starter
(@xernovil)
Active Member
Joined: 8 years ago

Hello,

Maybe you could tell me a better solution, but i'm trying to mix Ultimate Member plugin with wpForo plugin. I only want one user management, so I want to disable the profile and account pages of wpForo. I know that I'll loose many functionalities, but I'll keep the most important for my purposes.

I've edited the class-template.php file in order to hide and disable the pages I mentioned (account, profile), and the rest (login, register, password reset) I've redirected through the proper option that we have in the plugin adjustment.

I'm sure that with the new update I'll loose the changes, so I want to know if there is any option to avoid loosing changes, could you help me please?

I don't want that Profile or Account pages appears in the submenu when I enter, for example, in suscriptions/activity pages.

the changes I did:

public function init_member_templates(){
                               WPF()->member_tpls = array(
                                               /*'account' => wpftpl('profile-account.php'),*/
                                               'activity' => wpftpl('profile-activity.php'),
                                               'subscriptions' => wpftpl('profile-subscriptions.php')
                               );
                               WPF()->member_tpls = apply_filters('wpforo_member_templates_filter', WPF()->member_tpls);
                               /*WPF()->member_tpls['profile'] = wpftpl('profile-home.php');*/
                }

 

and

public function member_menu( $userid, $menu = array() ){
                               if( empty($menu) ) $menu = array(/*'profile' => 'fas fa-user', 'account' => 'fas fa-cog',*/ 'activity' => 'fas fa-comments', 'subscriptions' => 'fas fa-rss');
                               $menu = apply_filters('wpforo_member_menu_filter', $menu, $userid);
                               /* if( !($userid == WPF()->current_userid || WPF()->perm->usergroup_can('em')) ) unset($menu['account']); */
                               if( !($userid == WPF()->current_userid || WPF()->perm->usergroup_can('vpra')) ) unset($menu['activity']);
                               if( !($userid == WPF()->current_userid || WPF()->perm->usergroup_can('vprs')) ) unset($menu['subscriptions']);
                               foreach( $menu as $key => $value ) :
            ?>

Thank you in advance!


4 Replies
Posts: 392
(@anonymous3542)
Honorable Member
Joined: 8 years ago
Posts: 11
Topic starter
(@xernovil)
Active Member
Joined: 8 years ago

@anonymous3542 Thanks for your answer!

Is not exactly what I need, but could work! I want to keep "Suscriptions" and "Activity", there is any possibility to do that?

Now all the profile optiones (included "suscriptions" and "activity") are redirected to UM profile.

Thanks in advance again!


Posts: 392
(@anonymous3542)
Honorable Member
Joined: 8 years ago

@xernovil,

The function provided will force ask profile fields to UM. The wpForo developers are working on UM integration presently although no actual release date has been specified.


Posts: 11
Topic starter
(@xernovil)
Active Member
Joined: 8 years ago

@anonymous3542,

Ok! Thank you for the information.