Show data obtained from a function and place it in a shortocode function
I don’t really understand what you’re trying to do. Why don’t you just call the function inside the shortcode handler? This looks more like general PHP question. Say we have a variable in our functions.php or wherever you define your shortcodes: $another_var = doSomeFunctionThatReturnsData(); With modern anonymous functions, you can pass variables using the use … Read more