• Resolved arathra

    (@arathra)


    Trying to extend the tabs on UM 2.0 I have two problems with this code:

    add_filter('um_profile_tabs', 'add_custom_profile_tab', 1000 );
    function add_custom_profile_tab( $tabs ) {
    	$tabs['contactlinks'] = array(
    		'name' => 'Contact/Links',
    		'icon' => 'um-faicon-comments',
    		'custom' => true,
    	);
    	return $tabs;
    }
    add_action('um_profile_content_contactlinks_default', 'um_profile_content_contactlinks_default');
    function um_profile_content_contactlinks_default( $args ) {
    	echo '[ultimatemember form_id=12760]';
    }
    
    add_filter('um_profile_tabs', 'add_custom_profile_tab2', 1001 );
    function add_custom_profile_tab2( $tabs ) {
    	$tabs['inemails'] = array(
    		'name' => 'IN Emails',
    		'icon' => 'um-faicon-comments',
    		'custom' => true,		
    	);
    	return $tabs;
    }
    add_action('um_profile_content_inemails_default', 'um_profile_content_inemails_default');
    function um_profile_content_inemails_default( $args ) {
    	echo '[ultimatemember form_id=13431]';
    }

    The first problem is that the 2nd tab – INEMAILS does not show up at all.

    The second problem is that the first tab still shows the URL argument of

    …/?profiletab=mycustomtab

    In other words, the URL doesn’t change.

    Can you help? Thanks!

  • The topic ‘UM 2.0 more than one custom tab’ is closed to new replies.