<?php if(wp_kses_post(get_theme_mod( 'dmtheme_logo_width' ))){ ?>
width="<?php echo wp_kses_post(get_theme_mod( 'dmtheme_logo_width' )) ?>"
<?php }?>
<?php if(wp_kses_post(get_theme_mod( 'dmtheme_logo_height' ))){ ?>
height="<?php echo wp_kses_post(get_theme_mod( 'dmtheme_logo_height' )) ?>"
<?php }?> Wordpress Yüklenen Site Logosunun Yükseklik ve Genişlik Değerini HTML'e Nasıl Yazdırabilirim?
13
●115
- 15-08-2021, 03:34:27Tamamdır şimdi yapmayı başardım. Sonuç:
- 15-08-2021, 03:39:26
<?php $site_logo_wh = getimagesize(esc_url(get_theme_mod( 'dmtheme_logo' ))); ?> <img src="<?php echo esc_url( get_theme_mod( 'dmtheme_logo' ) ); ?>" width="<?php echo $site_logo_wh[0]; ?>" height="<?php echo $site_logo_wh[1]; ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>">
- 15-08-2021, 03:48:35Vaw hocam vaw ya, konuyu açtığımdan beri uğraşıyordum.brown adlı üyeden alıntı: mesajı görüntüle
- 03-12-2021, 10:53:10Hocam projeyi localhost'dan web'e aldım ilginç bir şekilde localhost'da çalışırken web'de çalışmadı. var_dump ile şu çıktıyı veriyor: bool(false)brown adlı üyeden alıntı: mesajı görüntüle
Ne yanlış anlamadım.
localhost'da aynı kod şöyle sonuç veriyor:
C:\wamp64\www\***\wp-content\themes\laura\header.php:40: array (size=6) 0 => int 272 1 => int 50 2 => int 3 3 => string 'width="272" height="50"' (length=23) 'bits' => int 8 'mime' => string 'image/png' (length=9)
iyi çalışmalar.