I have in wordpress functions.php file
This sample works with one variable only, but i want multiple variables
function variables() {
$var1 = 'lorem';
return $var1;
}
in the front template results "lorem":
echo variables();
works fine, but if i have many variables how can i displayed it?
example:
echo variables('var1');
echo variables('var2');
echo variables('etc');
i found a solution using global variables, but i don't like use that.
edit:
in functions.php add variables :
$some = "lorem 1"
$some2 = "lorem 2"
$some3 = "lorem 3"
then display in theme
<?php echo some(); ?>
<?php echo some2(); ?>
<?php echo some3(); ?>