Skip to content

Instantly share code, notes, and snippets.

@redrambles
Last active March 31, 2016 14:54
Show Gist options
  • Save redrambles/9e72b413bd270c69983c8ed40673915e to your computer and use it in GitHub Desktop.
Save redrambles/9e72b413bd270c69983c8ed40673915e to your computer and use it in GitHub Desktop.
// first method
<img src="<?php echo get_stylesheet_directory_uri(); ?>/img/taxi-photo-about.jpg"/>
// second method
<?php $image_src = wp_get_attachment_url(47459, 'full'); ?>
<img src="<?php echo $image_src; ?>"/>
// third method
<?php $image_id = 47603;
echo wp_get_attachment_image($image_id, 'full' ); ?>
// With ACF - if you have the 'pro' version, you can create an options page variable for your client to use in a 404 page.
// Not recommended as this path will break upon migrating
<img src="http://localhost/accelerate/wp-content/uploads/2006/11/IMG_3231.jpg"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment