trouble with local server and "get_stylesheet_directory"
-
I have this issue where I can’t seem to get my image to display when it is in my child themes folder. If I plop it in the root wordpress folder and just point to the file name of the image it works fine.
so heres a bit of code that I’m dealing with:
<?php $imgpath = get_stylesheet_directory(); $imgpath = $imgpath."/logo.png"; echo $imgpath; ?> <div id="header"> <img width="800px" height = "300px" src="<?php echo $imgpath ?>";/> </div><!-- #header -->
$imagepath resolves to this:
C:\wamp\www\wordpress/wp-content/themes/TestTheme/logo.pngthe slashes are backwards after the root directory which seems to cause my image to point to an ‘about:blank’ page.
I’m still pretty new to web programming so I’m sure that I’m ignorant of something going on here.
Thanks!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘trouble with local server and "get_stylesheet_directory"’ is closed to new replies.