• Resolved segamaze

    (@segamaze)


    Hi,

    I have a custom code/plugin where I get the follower count for a specific social media platform. Now I want to display these numbers on the people profiles.
    Is there a way to save them in some kinda of meta values?

    This values will be updated once every day and not on the site refresh of a profile.

    Otherwise I would save them in the wp_option table.

    • This topic was modified 2 years, 3 months ago by segamaze.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support mansurahamed

    (@mansurahamed)

    Hi @segamaze,

    Yes, you can simply use the update_user_meta() function to save the follower count for each user in the wp_usermeta table by their user ID. The metakey name is important here as we will use it to show that particular entry in profile form.

    Now just go to Ultimate Member->Forms->Your Profile Form->Edit, inside your dashboard and add a custom text field in the profile form using the exact same metakey. Make sure to set Visibility mode to view mode only so that user won’t be able to modify it. That’s it, user should see followers count in profile now. If your code of update_user_meta() updates the value time to time, it should happen to UM profile too as the value get fetched using the same metakey. Hope this helps.

    Thank you.

    Plugin Support mansurahamed

    (@mansurahamed)

    Hi @segamaze,

    This thread has been inactive for a while. We are going to mark it as Resolved for now, please feel free to re-open the thread if you have any questions.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Save dynamic values into profiles meta keys’ is closed to new replies.