admin管理员组

文章数量:1296880

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="/../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!

本文标签: phpInclude User ID in iFrame URL