Something like this?
<iframe src="http://remotesite.com?userid=<?php echo get_current_user_id(); ?>"></iframe>
Just take a note of what it says on the codes page as well, just in case. https://codex.wordpress.org/Function_Reference/get_current_user_id
Thread Starter
MM2
(@mm2)
Thank you, but it don’t work.
I have installed the “Advanced iframe Pro” and the code in WordPress is:
[advanced_iframe securitykey="4g4j54jh46g32gf67" src="http://www.domain.com/zertvbapp/userid.php?userid=<?php echo get_current_user_id(); ?>" id="example1"]
The code from userid.php is:
<?php
echo "Start<br>";
echo "(".$_GET["userid"].")";
echo "End";
?>
And the output is:
Start
()End
How can I check, if the PHP Code execute correct in wordpress?
Thank you!
Michael
Yeah, that’s in a shortcode, and you can’t do it that way. Shortcodes don’t work with PHP code, so you’d need to figure something else out.
As it’s done via a plugin, the plugin needs to be set up to do this. You would need to check with the plugins author or vendor for support as it’s a commercial plugin.