Last active
August 29, 2015 14:17
-
-
Save asathoor/c0fa01d8ae7a9ead9e87 to your computer and use it in GitHub Desktop.
Images in a WordPress theme or child theme - several methods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- in case of problems with displaying the images chmod 777 and chown daemon:daemon --> | |
<!-- link to media files --> | |
<p> | |
<img src="http://localhost/test/wordpress/wp-content/uploads/2015/03/cropped-download-1.jpg" width="200" height="*"> | |
<p> | |
<!-- image in the template folder --> | |
<p> | |
<img src="<?php bloginfo('stylesheet_directory');?>/images/car.jpg"/ > | |
</p> | |
<!-- via CSS --> | |
<div id="anImage"></div> | |
<!-- the stylesheet --> | |
<style> | |
#anImage { | |
background-image: url(images/car.jpg); | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment