So,
My images are located in wp-content/themes/mytheme/images
Originally, when i converted my site from html/css the path looked like this:
<img src="images/myimage.png" alt="some text" />
That did not work and I have now tried two diffrent solutions:
<img src='<?php get_template_directory_uri(); ?>/images/myimage.png'>
and
<img src="<?php bloginfo(); ?>images/myimage.png">
Have i missed something? I am new to wordpress an php and would appreciate some help. Thanks!
You almost had it. You left off
echo
.http://codex.wordpress.org/Function_Reference/get_template_directory_uri
Output the URI
The full result is:
I recommend you use Drupal if you haven’t gotten too far with WP already. 🙂
Try
/images/myimage.png”>
This will return the images directory path in the currently selected theme, even if it’s a child theme.
Function Reference/get stylesheet directory