Support

Account

Home Forums General Issues Get current user_id to insert into shortcode

Unread

Get current user_id to insert into shortcode

  • Hello,

    I have a website (ACF, dynamic data, breakdance builder) with profiles of people. Each person has a detail page (profile page) what you can acces from out the listing page (overview).

    Ultimate Member (Pro) is also used and it’s Messaging system addon. I need a function to get the current user_id. Because it changes depending on the profile (person) you select from the listing (overview) page. As I want insert this shortcode to display a button: [ultimatemember_message_button user_id=”123″]. So I need modify user_id=”xxxxxx” with what is needed.

    Of course each profile (person) has a WP user account and I can add this user_id into my ACF fields set. (BTW: Each profile has it’s own ID in ACF already).

    How can I do this? Thanks for any tipp.

    Tom

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.