• Resolved zoomlord

    (@zoomlord)


    hi i want to create a custom tab for helpdesk and support stuff and i cant find any codes for it and i dont want to show the content of the page just When someone clicks on a tab, page changes to another URL like (example.com/account/mytab/ to example.com/support)
    please help me thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @zoomlord

    Have you tried checking this doc explaining how to add a custom tab?
    https://docs.ultimatemember.com/article/69-how-do-i-add-my-extra-tabs-to-user-profiles

    As for the URL structure, UM only adds the tab slug that looks like this ?profiletab=mytab

    Regards,

    Thread Starter zoomlord

    (@zoomlord)

    hi
    no i mean the account page have tabs and i want to add a new tab with new link i tried this code

    /* add new tab called "mytab" */
    
    add_filter('um_account_page_default_tabs_hook', 'my_custom_tab_in_um', 100 );
    function my_custom_tab_in_um( $tabs ) {
    	$tabs[800]['mytab']['icon'] = 'um-faicon-pencil';
    	$tabs[800]['mytab']['title'] = 'My Custom Tab';
    	$tabs[800]['mytab']['custom'] = true;
    	return $tabs;
    }
    	
    /* make our new tab hookable */
    
    add_action('um_account_tab__mytab', 'um_account_tab__mytab');
    function um_account_tab__mytab( $info ) {
    	global $ultimatemember;
    	extract( $info );
    
    	$output = $ultimatemember->account->get_tab_output('mytab');
    	if ( $output ) { echo $output; }
    }
    
    /* Finally we add some content in the tab */
    
    add_filter('um_account_content_hook_mytab', 'um_account_content_hook_mytab');
    function um_account_content_hook_mytab( $output ){
    	ob_start();
    	?>
    		
    	<div class="um-field">
    		
    		<!-- Here goes your custom content -->
    		
    	</div>		
    		
    	<?php
    		
    	$output .= ob_get_contents();
    	ob_end_clean();
    	return $output;
    }

    but i dont know what am i have to add in content like link a page i know the shortcode like do_shortcode but i dont know how can i link a page

    • This reply was modified 4 years, 1 month ago by zoomlord.
    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @zoomlord

    Your code snippets have deprecated codes. Please see this doc explaining how to add a custom tab with custom content:
    https://docs.ultimatemember.com/article/1504-how-to-add-custom-woocommerce-fields-to-account

    Regards,

    Zoomlord,

    I did find your post, because I want the same result, and I just find the solution: https://wpfavs.com/plugins/profile-tabs-for-ultimate-member

    there is “custom url” option for the TAB button

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘use a specific url for custom tab’ is closed to new replies.