Include User ID in iFrame URL

I seem to have hit a roadblock trying to figure out how to append the user ID to an embedded iFrame url address. I am using a third party app that tracks unique users (and invoices me accordingly). Unfortunately, they were unable to help me figure it out.

The embed code is: iframe src=https://www.hostingsite.com/../embed/?u=[get_user_id_code_should_go_here] width=100% height=500 frameBorder=0 allowfullscreen/iframe where the ?u parameter should display the user id.

I was told that the way I would know it works is if the ID would show up in the page source. Unfortunately, I tried the ?php echo get_current_user_id(); ? and it did not work (displays exactly the text ?php echo get_current_user_id(); ?, but after doing a little bit of digging, I think I found out this would not be possible to begin with.

Am I supposed to include something in a template to make this work or should Wordpress handle this out of the box? I am running WP 5.7 with the latest version of Memberpress.

Thanks in advance for your help!

Topic user-meta embed iframe functions php Wordpress

Category Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.