Multiple taps in Account Only show one content
-
I am current using Ultimate Member 1.3.49, which is a greater plugin. I want to add multiple taps in Account following the suggestion on this website https://gist.github.com/ultimatemember/f7eab149cb33df735b08″and https://ultimatemember.com/forums/topic/multiple-custom-profile-tabs/”. No I can see there are two different taps, one is Summary, and another is Process. However, Only content of Summary shows up, but content of Process is missing. The following is my code example.
I really appreciate your help!
add_filter('um_account_page_default_tabs_hook', 'my_custom_tab2_in_um', 100 ); function my_custom_tab2_in_um( $tabs ) { $tabs[600]['summary']['icon'] = 'um-faicon-pencil'; $tabs[600]['summary']['title'] = 'Summary'; $tabs[600]['summary']['custom'] = true; return $tabs; } 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-play'; $tabs[800]['mytab']['title'] = 'Process'; $tabs[800]['mytab']['custom'] = true; return $tabs; } 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; } } /* make our new tab hookable */ add_action('um_account_tab__summary', 'um_account_tab__summary'); function um_account_tab__summary( $info ) { global $ultimatemember; extract( $info ); $output = $ultimatemember->account->get_tab_output('summary'); if ( $output ) { echo $output; } } add_filter('um_account_content_hook_summary', 'um_account_content_hook_summary'); function um_account_content_hook_summary( $output ){ ob_start(); ?> <div class="um-field"> <!-- Here goes your custom content --> <!-- My content goes here --> <!-- Here goes your custom content --> </div> <?php $output .= ob_get_contents(); ob_end_clean(); return $output; } 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 --> <!-- My content goes here --> <!-- Here goes your custom content --> </div> <?php $output .= ob_get_contents(); ob_end_clean(); return $output; }
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Multiple taps in Account Only show one content’ is closed to new replies.