• Resolved Etienne

    (@epipo)


    Hi,

    I have two issues:

    – I’d like to remove entire field groups from the account page.

    – I’d like to disable profile pages entirely (no link anywhere), what would be the best way to do so?

    Thanks for your help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Etienne

    (@epipo)

    Alright, I’ve found a way to remove an entire field group, I’ve just changed the primary_id value of the field groups I didn’t want to 1. I still need to:

    – Change the order in the nav tab ;
    – Disable profile pages entirely.

    Thanks!

    • This reply was modified 6 years ago by Etienne.
    Plugin Contributor Alessandro Tesoro

    (@alessandrotesoro)

    Hi there,

    I would advise against modifying the database content, modifying db content could lead to some unexpected issues. Instead you could use the hooks provided by the plugin to hide sections you don’t need.

    All custom fields groups nav tabs are added through a filter called ‘wpum_get_account_page_tabs’ you can use the filter to unset specific tabs if needed.

    Here’s how:

    function wpum_hide_account_tabs( $tabs ) {
    
    	if ( isset( $tabs['my-tab-id-goes-here'] ) ) {
    		unset( $tabs['my-tab-id-goes-here'] );
    	}
    
    	return $tabs;
    
    }
    add_filter( 'wpum_get_account_page_tabs', 'wpum_hide_account_tabs', 30 );

    You can inspect the $tabs variable to find the id for your fields group.

    In regards to the order, there seems to be a bug with that. You can drag and drop fields groups in the admin panel to change the order but it’s not being applied onto the frontend. I’ll fix it in the next update. Meanwhile you can use the filters to adjust the order.

    Using the same filter displayed above wpum_get_account_page_tabs, you can set a “priority” parameter with a number, the order of the tabs then will change based on that number.

    Example:

    function wpum_my_tabs_order( $tabs ) {
    
    	$tabs['tab-id-goes-here']['priority'] = 999;
    
    	return $tabs;
    
    }
    add_filter( 'wpum_get_account_page_tabs', 'wpum_my_tabs_order', 30 );

    To disable the profiles page, this should be easily achieveble by just removing the profile page selected in the settings panel. Go to users -> settings -> profile page, click on the dropdown and then click again onto the previously selected profile page this should disable the option and the page should disappear now.

    Thread Starter Etienne

    (@epipo)

    Awesome! Everything works great. Thanks a lot!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Removing entire field groups from account page’ is closed to new replies.