[insert_php]
if (userpro_is_logged_in()){
global $userpro;
$user_id = get_current_user_id(); // or the user ID you want to retrieve
echo userpro_profile_data (‘sales_rep’, $user_id);
}else{
echo “Your Support Representative is not assigned yet”;
}
[/insert_php]
Wont echo back now.
With the code as it is, the three functions, userpro_is_logged_in(), get_current_user_id(), and userpro_profile_data() must all be available to the eval() function at the point that the PHP code is executed.
(The code between the [insert_php] and [/insert_php] tags is run by the eval() function.)
If this worked in a previous version of WordPress, then all of those functions were available to eval() at the time it was executed.
Try putting each of those function between the same [insert_php] and [/insert_php] tags with the rest of the code. They should then be accessible.
Will
Are you aware of the problem of the change to the shortcode API, which has resulted in a # of problems when shortcode is inserted into HTML?
Changes to the Shortcode API
Currently I’m using ‘Allow PHP in Posts and Pages’, but would love to switch to this plugin if it’s still being developed.
Any ideas if the aforementioned has been implemented in the latest version of this plugin?
boybawang, I guess there’s a bit of a misunderstanding.
Insert PHP doesn’t use shortcodes
Will
Thanks Will. I think I need to dig into the problem a bit more.