• I have using the WordPress Theme: Magasin Dos form <a https://www.paddsolutions.com, in custom fields I don’t want use my image form wp content because it’s make my blog loading are slow but i want use image from flickr.com or photobucket.com.

    I’m trying send email to author at https://www.paddsolutions.com but it’s no respon.

    this code at gallery.php:

    <?php while (have_posts()) : the_post(); ?>
    	<?php
    		$customfields = get_post_custom();
    		$scrp = get_bloginfo('wpurl') . '/wp-content/themes/magasin-dos/functions/timthumb.php?';
    		if (empty($customfields['paddimage'][0])) {
    			$imgpath = $scrp . 'src=' . get_bloginfo('wpurl') . '/wp-content/themes/magasin-dos/images/thumbnail.png' . '&amp;w=68&amp;h=68&amp;zc=1';
    		} else {
    			$imgpath = $scrp . 'src=' . get_bloginfo('wpurl') .  $customfields['paddimage'][0] . '&amp;w=390&amp;h=250&amp;zc=1';
    		}
    	?>

    Any somebody help me?

Viewing 2 replies - 1 through 2 (of 2 total)
  • <?php while (have_posts()) : the_post(); ?>
    	<?php
    		$customfields = get_post_custom();
    		$scrp = get_bloginfo('wpurl') . '/wp-content/themes/magasin-dos/functions/timthumb.php?';
    		if (empty($customfields['paddimage'][0])) {
    			$imgpath = $scrp . 'src=' . get_bloginfo('wpurl') . '/wp-content/themes/magasin-dos/images/thumbnail.png' . '&amp;w=68&amp;h=68&amp;zc=1';
    		} else {
    			$imgpath =  $customfields['paddimage'][0];
    		}
    	?>

    That would take the image from whichever URL you have as your custom field – so enter https://flickr.com/myuserid/picturereference for that picture.

    Only problem is that you will need to render the size yourself. So wherever the image actually gets printed, probably something like

    <img src="<?php echo $imgpath; ?>" alt="Something">

    you’ll need to add the max width you want (or the max height):

    <img src="<?php echo $imgpath; ?>" alt="Something" width="68">

    Thread Starter vacom

    (@vacom)

    How to edit this code so that I get put image form flickr.com or photobucket.com?

    $scrp = get_bloginfo('wpurl') . '/wp-content/themes/magasin-dos/functions/timthumb.php?';

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Fields Troubleshooting’ is closed to new replies.