Title: PHP Get Theme Folder
Last modified: August 19, 2016

---

# PHP Get Theme Folder

 *  [jellyfire](https://wordpress.org/support/users/jellyfire/)
 * (@jellyfire)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/php-get-theme-folder/)
 * Hey, I am new to wordpress and php, although I have experience in a C++ language(
   MEL). But am having problems trying to get on my feet with a few things.
 * I’m creating a theme from scratch for my website. The theme directory has an 
   images folder as well as the css and php files. The small problem I have is when
   the php files are brought together that html file is at “site.com/wordpress/page.
   html” so any images in the image folder won’t work being relative to the index.
   php file.
 * What is the code to get my images to have a prefix to the theme directory?
    I
   tried this after doing a search on here but it didn’t work: `<a href="#"><img
   src="<?php TEMPLATEPATH(); ?>/images/resume.gif" /></a>`
 * What am I doing wrong?
    Thanks for any help. Christian

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [hotkee](https://wordpress.org/support/users/hotkee/)
 * (@hotkee)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/php-get-theme-folder/#post-794660)
 * <?php include(TEMPLATEPATH . ‘/images/resume.gif’; ?>
 *  Thread Starter [jellyfire](https://wordpress.org/support/users/jellyfire/)
 * (@jellyfire)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/php-get-theme-folder/#post-794664)
 * Thanks, although I’m getting a problem that I think is bigger than I originally
   though (that I just didn’t know the syntax).
 * If I hard-code it, my site shows up fine:
    `<a href="#"><img src="/images/resume.
   gif'" /></a>`
 * If I do this:
    `<a href="#"><img src="<?php include(TEMPLATEPATH . '/images/resume.
   gif'; ?>" /></a>`
 * Then my entire site dissapears and just shows white and the source is blank.
   
   Am I being completley stupid? Christian
 *  [hotkee](https://wordpress.org/support/users/hotkee/)
 * (@hotkee)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/php-get-theme-folder/#post-794667)
 * Sorry my fault, its trying to include if you do that – although note you didnt
   have right closing bracket.
 * Try this
 * src=”<?php bloginfo(‘stylesheet_directory’); ?>/images/resume.gif”
 *  Thread Starter [jellyfire](https://wordpress.org/support/users/jellyfire/)
 * (@jellyfire)
 * [17 years, 11 months ago](https://wordpress.org/support/topic/php-get-theme-folder/#post-794668)
 * Brilliant! That works perfectly.
    Thanks for your help! Christian

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘PHP Get Theme Folder’ is closed to new replies.

## Tags

 * [folder](https://wordpress.org/support/topic-tag/folder/)
 * [path](https://wordpress.org/support/topic-tag/path/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [jellyfire](https://wordpress.org/support/users/jellyfire/)
 * Last activity: [17 years, 11 months ago](https://wordpress.org/support/topic/php-get-theme-folder/#post-794668)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
