• 14-03-2020, 00:25:26
    #1
    Arkadaşlar bootstrap kullanarak wordpress tema yapıyorum. Diğer görsellerde sorun yok ama <?php the_content(); ?> içerisinde gelen görseller responsive olmuyor nasıl responsive yapabilirim?
    Yabancı formlarda söylenen yöntemler işe yaramadı.
  • 14-03-2020, 00:34:29
    #2
    bir div ID'nin içine contenti basıp, css de #divId > img{ max-width:100%;} ile yapılabileceğini tahmin ediyorum ama denemek lazım
  • 14-03-2020, 00:42:56
    #3
    Javascript ile dom load olduktan sonra tüm img taglarına ya da bir div içerisindeki tüm img taglarına img-fluid classı ekleyebilirsin veya css kısmında halledebilirsin.
  • 14-03-2020, 01:10:45
    #4
    Arkadaşlar nasıl yaptım bilmiyorum ama bu şekilde oldu.

    functions.php
    
    function img_responsive($content){
    return str_replace('<img class="','<img class="img-responsive ',$content);
    }
    add_filter('the_content','img_responsive');
    
    
    
    style.css
    
    .img-responsive{
        height: auto; max-width: 100%;
    }
    
    img.aligncenter{
        height: auto; max-width: 100%;
    }
  • 14-03-2020, 01:17:15
    #5
    functions.php
     
    function img_responsive($content){
    return str_replace('<img class="','<img class="img-fluid ',$content);
    }
    add_filter('the_content','img_responsive');
    Bu da yeterli olur, ek css gerek yok. Bootstrap'ın kendi responsive image kodu var.
    https://getbootstrap.com/docs/4.4/content/images/#responsive-images
  • 14-03-2020, 01:24:11
    #6
    MuhammetDemirel adlı üyeden alıntı: mesajı görüntüle
    functions.php
     
    function img_responsive($content){
    return str_replace('<img class="','<img class="img-fluid ',$content);
    }
    add_filter('the_content','img_responsive');
    Bu da yeterli olur, ek css gerek yok. Bootstrap'ın kendi responsive image kodu var.
    https://getbootstrap.com/docs/4.4/co...ponsive-images
    Aynen oldu teşekkürler