• Resolved tiitosport

    (@tiitosport)


    Hi team,

    I hope you are well ??

    For some context, I use the default shortcode [ultimatemember_account] to display the account options to the user, like changing the password or deleting the account.

    However, when loading a page with this shortcode, an account tab is opened by default: the account tab. This does not look very nice on my webpage, so I would like to know if it is possible to ensure no tabs are opened by default.

    I tried with CSS and the best I could do was with:

    .um-account-tab {
      display: none !important;
    }

    But the issue with that is that then the user cannot open any tab.

    If I remove the !important, the tab is opened by default, even with the CSS display:none.

    Is there a built in option in Ultimate Member to ensure no tabs are opened when loading this shortcode? If not, do you have a PHP function I can copy-paste in my functions.php file, or some CSS code? (or anything else)

    Let me know if you need more information.

    Best,

    Tiito

Viewing 2 replies - 1 through 2 (of 2 total)
  • missveronica

    (@missveronicatv)

    @tiitosport

    You can try this code snippet to disable opening of the account default tab:

    add_filter( 'um_change_default_tab', 'um_no_account_default_tab', 10, 2 );
    
    function um_no_account_default_tab( $current_tab, $args ) {
    
        return 'no_default_tab';
    }

    Add the code snippet to your active theme/child-theme’s functions.php file
    or use the “Code Snippets” plugin.

    https://www.ads-software.com/plugins/code-snippets/

    Thread Starter tiitosport

    (@tiitosport)

    Hi @missveronicatv , it worked perfectly, you are a legend! Feel free to close this request.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Account tab opened by default when loading the page’ is closed to new replies.