Support » Plugin: WP User Manager - User Profile Builder & Membership » Need to extra field in account page

Viewing 1 replies (of 1 total)
  • Plugin Author Alessandro Tesoro

    (@alessandrotesoro)

    Hi there,

    Do you need to add a custom tab and display a shortcode in there? If so, you can use custom code to add new tabs. This code can be added to your theme’s functions.php file.

    1) Register the new tab:

    function wpum_mycustom_account_tabs( $tabs ) {
    
    	$tabs['myowntab'] = [ 'name' => 'Tab title here', 'priority' => 999 ];
    
    	return $tabs;
    
    }
    add_filter( 'wpum_get_account_page_tabs', 'wpum_mycustom_account_tabs', 30 );

    2) Register the custom content for the tab:

    function wpum_myowntab_content() {
    
        echo do_shortcode('[yourshortcode]');
    
    }
    add_action('wpum_account_page_content_myowntab', 'wpum_myowntab_content');

    Of course, you’ll need to replace the shortcode with your own one, and if you change the tab id “myowntab” to something else, make sure you also modify the name within the add_action function.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.