• Resolved user70

    (@user70)


    I need help with adding a custom filed to the my account dashboard for users.

    I have a function that creates a unique membership id for every new registration. I want to be able to display that membership id in the my-account dashboard of every user.

    Can you guide me with this?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @user70,

    If you want to display extra information in the user’s dashboard then you will have to edit the code that displays the user’s dashboard. Please go through this link https://docs.wpeverest.com/docs/user-registration/how-to/template-structure/ and let me know if it helps or not.

    Regards!

    Thread Starter user70

    (@user70)

    Thanks @sharmadpk03
    I’ve completed those steps, but I have not yet been able to get my function display results in the dashboard.

    
    function fetch_member_id(){
    	$current_user = wp_get_current_user();
    	$current_user_id = $current_user->ID;
    	global $wpdb;
    	$result = $wpdb->get_results('SELECT meta_value FROM usermeta WHERE meta_key = \'random_number\' AND user_id = ' . $current_user->ID);
    	foreach($result as $row){
    		return 'Membership ID: '. $row->meta_value;		
    	}
    }
    

    I’m trying to display a membership id in the user’s dashboard, but I get the following error in the dashboard tab

    There has been a critical error on your website.

    • This reply was modified 4 years, 9 months ago by user70.
    Plugin Support sanjuacharya77

    (@sanjuacharya77)

    Hi @user70,

    Please contact our developer team regarding this issue. You can contact them here https://wpeverest.com/contact/ and someone from the team will get back to you.

    We might have to work on your site to see what’s actually causing the issue so please contact them here and we will follow you up.

    Regards!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display custom data in my-account dashboard’ is closed to new replies.