Best way of passing PHP variable between partials

Posted by Prem Tiwari | Updated on

An easy solution is to write a function to get the extra title. I use a static variable to keep the database calls to one only. Put this in your functions.php file.

Outside header.php, call the function to get the value:

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers