BEFORE READING: KEEP IN MIND THIS IS THE INDEX.PHP FILE OF A WORDPRESS BLOG THEME <?php $customfields = get_post_custom(); $scrp = get_bloginfo('wpurl') . '/wp-content/themes/magasin-uno/functions/timthumb.php?'; if (empty($customfields['paddimage'][0])) { $imgpath = $scrp . 'src=' . get_bloginfo('wpurl') . '/wp-content/themes/magasin-uno/images/thumbnail.png' . '&w=68&h=68&zc=1'; } else { $imgpath = $scrp . 'src=' . get_bloginfo('wpurl') . $customfields['paddimage'][0] . '&w=68&h=68&zc=1'; } ?> Code (markup): It calls for a PHP script called "timthumb", and adds whatever is in the "paddimage" field to it, which results in an image source address something like this: http://toothsurgery.info/wp-content/themes/magasin-uno/functions/timthumb.php?src=http://toothsurgery.info/wp-content/themes/magasin-uno/images/root%20canal%20thumb.jpg&w=68&h=68&zc=1 Code (markup): I'm not exactly 100% sure how this code works (I'm only moderately fluent in PHP). What I'm trying to do is get around the whole timthumb script and get a url that consists of JUST the image from the "paddimage" field, no php file. How can I do that?
try this - <?php $customfields = get_post_custom(); // $scrp = get_bloginfo('wpurl') . '/wp-content/themes/magasin-uno/functions/timthumb.php?'; // if (empty($customfields['paddimage'][0])) { // $imgpath = $scrp . 'src=' . get_bloginfo('wpurl') . '/wp-content/themes/magasin-uno/images/thumbnail.png' . '&w=68&h=68&zc=1'; // } else { $imgpath = 'src=' . get_bloginfo('wpurl') . $customfields['paddimage'][0] . '&w=68&h=68&zc=1'; // } ?> Code (markup): timthumb.php is a thumbnail resizer script - this originally reads as follows: grab a custom field find the resizer script if there is not a custom field called paddimage look for a fixed thumbnail image called thumbnail.png and then force the path to use the thumbnail resizer. I just commented out everything you dont need and removed the call to the timthumb in the path ($scrp) . hope that works for ya aj
did that work? also do you do web graphics? I need custom headers done for WP sites. Nothing too fancy but need to be professional. No clip art. I do WP customization so I can likely help you with PHP and WP code customization. PM me your contact info if you are interested in working together