I have declared a variable in my single.php
$title = 'myvar';
Can I get it in my comments.php without re-declaring it again?
I use this code to get the comments.php templage:
<? comments_template( '', true ); ?>
Ty
|
I have declared a variable in my single.php
Can I get it in my comments.php without re-declaring it again? I use this code to get the comments.php templage:
Ty |
|||
|
Questions on WordPress Answers are expected to relate to WordPress within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.
|
The The two methods I generally use are:
|
|||
|
|
|
You can use php session variables to utilize the myvar variable anywhere you want.
|
|||
|
|