what the best way to include images from the template’s images folder? is it by using get_bloginfo('template_url')
? I understood that its better to hard code the path to the images folder since this way you save function calls in PHP..
any thoughts?
The easiest and simplest way to do it is define a unique variable in your theme’s functions.php
file.
Such as:
<?php
$theme_name_images = get_bloginfo('stylesheet_directory') . '/images/';
?>
No need for classes as a previous answer suggested.
EDIT: It should be get_bloginfo, instead of bloginfo(), as Viper007Bond kindly pointed out.