Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm using WordPress 3.4 with plugin Magic Fields 2.0. I've created a write panel with an image field called 'icon' as a (media upload) type, and icon is not inside a group. However, whenever I try to call the get_image() functions front end functions, this fails to pull up the images.

Here's my code:

 <?php echo get_image( 'icon', 1, 1, 0, $page->ID ); ?>

$page is a page object that I've retrieved outside the loop. Here's the output:

File &ldquo;http://domain.com/wp-content/uploads/2012/07/tommy-icon1.jpg&rdquo; doesn&rsquo;t exist? 

When I check the server, that file does exist! I copy the address into my address bar, and the image loads in the browser.

I'm developing this on my local xampp host, using a dns record that's only in my hosts file. So, I'm wondering if that is causing the issue? Perhaps, since that file doesn't exist at that url remotely, that is causing a file_exists check to fail somewhere in Magic Fields.

Any advice to access this image would be greatly appreciated!

share|improve this question
    
I'm wondering I'm hitting a permissions issue.... –  Rustavore Aug 9 '12 at 20:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.