• I am trying to add button only on specific user account page where he/she can access another page when clicking on this button..But i cant done it.I am using visualCompany theme i added this code in themes function.php file for displaying msg only on specific user when he/she logged in but the code is not working..code is as follows,

    function custom_user_account_content() {
    $user = get_user_by(’email’, ‘[email protected]’); // Get the user object by email
    if ($user && $user->ID == get_current_user_id()) {
    // Display custom content for the user with the specified email
    echo ‘This is a special message for user [email protected].’;
    }
    }
    add_action(‘um_account_page_default’, ‘custom_user_account_content’);
    Please help me how i can done this..

    The page I need help with: [log in to see the link]

Viewing 3 replies - 16 through 18 (of 18 total)
  • Plugin Support andrewshu

    (@andrewshu)

    Hi @sunofar

    This thread has been inactive for a while so we’re going to go ahead and mark it Resolved.

    Please feel free to re-open this thread if any other questions come up and we’d be happy to help. ??

    Regards

    Thread Starter sunofar

    (@sunofar)

    This issue is resolved but i faced new problem with this plugin..I used login form shortcode for login page in ultimate member plugin.I did all setting but it not showing a register button in login page.

    Thread Starter sunofar

    (@sunofar)

    Hello dear,,

    I need help..i am created a one registration form in ultimate member where user can select which role he/she would assign them.i added custom user role like Employee and Web developer.. i want to show specific content to only web developer role. I used this code

    [um_show_content roles=”web developer”] Button ?[/um_show_content]

    but its not showing any text but when i used subscriber or administrator instead of employee or web developer It works..please help me as soon as possible..

Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘I have to add button only specific user account page’ is closed to new replies.