Hi Boris,
I am trying to make the UM tab either call a shortcdoe (not a UM shortcode) or redirect to a page on the site. I added in this code but it doesn’t load the shortcode content:
/* add new account tab called Read Me */
add_filter(‘um_account_page_default_tabs_hook’, ‘my_custom_tab_in_um’, 100 );
function my_custom_tab_in_um( $tabs ) {
$tabs[800][‘readme’][‘icon’] = ‘um-faicon-book’;
$tabs[800][‘readme’][‘title’] = ‘Read Me’;
$tabs[800][‘readme’][‘custom’] = true;
return $tabs;
}
/* make our new tab hookable */
add_action(‘um_account_tab__readme’, ‘um_account_tab__mytab’);
function um_account_tab__mytab( $info ) {
global $ultimatemember;
extract( $info );
$output = $ultimatemember->account->get_tab_output(‘readme’);
if ( $output ) { echo $output; }
}
/* Finally we add some content in the tab */
add_filter(‘um_account_content_hook_readme’, ‘um_account_content_hook_mytab’);
function um_account_content_hook_mytab( $output ){
ob_start();
?>
<div class=”um-field”>
<!– Here goes your custom content –>
<!– End of content –>
</div>
<?php
$output .= ob_get_contents();
ob_end_clean();
return $output;
}
-
This reply was modified 8 years, 3 months ago by
mmak0710.