Displaying a variable stored in functions.php inside widget
The widget operates in a different scope than the functions.php. You could use two different approaches to get around that. Make the variable global (put it into the top scope): // functions.php $GLOBALS[‘var_name’] = ‘hello’; // widget echo $GLOBALS[‘var_name’]; But that is risky: any other script can change the variable now accidentally, and it is … Read more