Adding a second custom TAB not showing
-
So far considering I am not a PHP expert, I have successfully added my first Tab and the Gravity form .
Somehow my second Tab is not showing. Also TAB order does not seem to work. How can I display at the top of the rest of Tabs navigations?
Can someone please help why?================================
/* add new tab called “CustomTabPFee” */
add_filter(‘um_account_page_default_tabs_hook’, ‘my_custom_tab_in_um’, 100 );
function my_custom_tab_in_um( $tabs ) {
$tabs[800][‘CustomTabPFee’][‘icon’] = ‘um-faicon-pencil-square-o’;
$tabs[800][‘CustomTabPFee’][‘title’] = ‘Placement Report’;
$tabs[800][‘CustomTabPFee’][‘custom’] = true;
$tabs[800][‘CustomTabPFee’][‘show_button’] = false;
return $tabs;
}/* make our new tab hookable */
add_action(‘um_account_tab__CustomTabPFee’, ‘um_account_tab__CustomTabPFee’);
function um_account_tab__CustomTabPFee( $info ) {
global $ultimatemember;
extract( $info );$output = $ultimatemember->account->get_tab_output(‘CustomTabPFee’);
if ( $output ) { echo $output; }
}/* Finally we add some content in the tab */
add_filter(‘um_account_content_hook_CustomTabPFee’, ‘um_account_content_hook_CustomTabPFee’);
function um_account_content_hook_CustomTabPFee( $output ){
ob_start();
?><!– <div class=”um-field”> –>
<div class=”gf_customfields” id=”gform_wrapper_63″>
<!– Here goes your custom content –>
<?php echo do_shortcode( “[gravityform id=’63’ user=’]”); ?></div>
<?php$output .= ob_get_contents();
ob_end_clean();
return $output;/*} */
/* add new 2nd tab called “ContractorInvoice” */
add_filter(‘um_account_page_default_tabs_hook’, ‘my_custom2_tab_in_um’, 200 );
function my_custom2_tab_in_um( $tabs ) {
$tabs[400][‘CustomTabInvoice’][‘icon’] = ‘um-faicon-pencil-square-o’;
$tabs[400][‘CustomTabInvoice’][‘title’] = ‘AAHC Invoice’;
$tabs[400][‘CustomTabInvoice’][‘custom’] = true;
$tabs[400][‘CustomTabInvoice’][‘show_button’] = false;
return $tabs;
}/* make our new tab hookable */
add_action(‘um_account_tab__CustomTabInvoice’, ‘um_account_tab__CustomTabInvoice’);
function um_account_tab__CustomTabInvoice( $info ) {
global $ultimatemember;
extract( $info );$output = $ultimatemember->account->get_tab_output(‘CustomTabInvoice’);
if ( $output ) { echo $output; }
}/* Finally we add some content in the tab */
add_filter(‘um_account_content_hook_CustomTabInvoice’, ‘um_account_content_hook_CustomTabInvoice’);
function um_account_content_hook_CustomTabInvoice( $output ){
ob_start();
?><!– <div class=”um-field”> –>
<div class=”gf_customfields” id=”gform_wrapper_52″>
<!– Here goes your custom content –>
<?php echo do_shortcode( “[gravityform id=’52’ user=’]”); ?></div>
<?php$output .= ob_get_contents();
ob_end_clean();
return $output;
}}
- The topic ‘Adding a second custom TAB not showing’ is closed to new replies.