• mudwort

    (@mudwort)


    When there is a user logged in, the message display as “Hello Username“. When no user is logged in it just displays “Hello”.

    I would like to selectively remove the “Hello” only when the visitor is not logged in.

    Any ideas of how I may achieve this?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi

    Please share your website’s link

    Thanks

    Thread Starter mudwort

    (@mudwort)

    https://benjamint7.sg-host.com/checkout/

    You may need to add something to the cart in order to access the checkout page.

    OK

    Try to adding this snippet to your active theme’s/child theme’s functions.php file:

    add_action( 'wp_head', 'ywp_hide_hello_for_not_logged_in_users' );
    function ywp_hide_hello_for_not_logged_in_users() {
        if ( is_checkout() && ! is_user_logged_in() )
            echo '<style>.avada-myaccount-user .avada-myaccount-user-column username{display:none!important}</style>';
    }

    And enjoy it ??

    Good luck

    Thread Starter mudwort

    (@mudwort)

    Thank you. I’ll confirm if it works.

    Thread Starter mudwort

    (@mudwort)

    Thanks. Works great except CSS needed a bit of tweaking.

    Well done

    You’re welcome

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Account/Checkout “Hello” message’ is closed to new replies.