• 27-07-2018, 01:50:25
    #1
    Selamlar.

    Eğer uplaod edilen featured image 500x180 boyutunda ise göster değilse no-image göster if else komutunu nasıl ayarlarım?
  • 27-07-2018, 02:01:16
    #2
    ikipac adlı üyeden alıntı: mesajı görüntüle
    Selamlar.

    Eğer uplaod edilen featured image 500x180 boyutunda ise göster değilse no-image göster if else komutunu nasıl ayarlarım?
    getimagesize kullanarak yapabilirsin. (http://php.net/manual/tr/function.getimagesize.php)
    <?php
    list($width, $height, $type, $attr) = getimagesize("imageurl");
    if($width == 500 && $height == 180){
    echo "no-image";
    }
    ?>
  • 27-07-2018, 02:16:30
    #3
    ilkerkurtel adlı üyeden alıntı: mesajı görüntüle
    getimagesize kullanarak yapabilirsin. (http://php.net/manual/tr/function.getimagesize.php)
    <?php
    list($width, $height, $type, $attr) = getimagesize("imageurl");
    if($width == 500 && $height == 180){
    echo "no-image";
    }
    ?>
    Teşekkürler ederim şu kısma ne yazacağız.

    getimagesize("imageurl");

    Temamdaki get img url kısmı.
    $img_url = wp_get_attachment_url( $thumb,'full'); //get img URL

    Böyle mi olacak?

    getimagesize($img_url );
  • 27-07-2018, 15:28:18
    #4
    ikipac adlı üyeden alıntı: mesajı görüntüle
    Teşekkürler ederim şu kısma ne yazacağız.

    getimagesize("imageurl");

    Temamdaki get img url kısmı.
    $img_url = wp_get_attachment_url( $thumb,'full'); //get img URL

    Böyle mi olacak?

    getimagesize($img_url );
    Evet.
  • 27-07-2018, 17:30:29
    #5
    Teşekkür ederim tekrar mükemmel çalışır.