How can I use static PHP variables in functions.php and use them for other coding in the WordPress template theme files
Easiest way is global variables:
https://wordpress.stackexchange.com/questions/151319/add-a-variable-in-functions-php-and-call-it-in-single-php
In your functions.php
global $welcome; $welcome = "hey guys";
In your theme files
global $welcome; echo $welcome;
And yah, you have to put the global twice, which looks goofy, but it’s required.
global
But using global vars is not recommended, it’s bad practice
Enter the destination URL
Or link to existing content