Use the following codes to generate a path to the WordPress root URL in theme and template files.
/** Use the get option to pull your domain name */
<?php echo get_option('home'); ?>
/** When inserted into an A or IMG tag writes the domain name */
<img src="<?php echo get_option('home'); ?>/images/filename.jpg">
/** Use the get option to pull your domain name */
<?php get_bloginfo('stylesheet_directory').'/images'; ?>
/** WWhen inserted into an A or IMG tag writes the path to your themes directory in wordpress */
<?php get_bloginfo('stylesheet_directory').'/images'; ?>
Share Your Two Cents