How do I use a php echo inside a short code in WordPress?

I am trying to define a variable for a plugin using a php variable inside of a shortcode in WordPress.

What I want to use is this:

[wpdatachart id=16 var1="<?php echo um_profile_id(); ?>"]

Obviously this won’t work, but what is the proper way of writing this?

Read more here: How do I use a php echo inside a short code in WordPress?

Leave a Reply

Your email address will not be published. Required fields are marked *