• 15-08-2021, 03:34:27
    #10
    Tamamdır şimdi yapmayı başardım. Sonuç:
                <?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 }?>
  • 15-08-2021, 03:39:26
    #11
    Developer
    <?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:35
    #12
    brown adlı üyeden alıntı: mesajı görüntüle
    <?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' ) ); ?>">
    Vaw hocam vaw ya, konuyu açtığımdan beri uğraşıyordum.
  • 15-08-2021, 03:51:45
    #13
    Developer
    SkyGhostAir adlı üyeden alıntı: mesajı görüntüle
    Vaw hocam vaw ya, konuyu açtığımdan beri uğraşıyordum.
    yeni gördüm iyi çalışmalar.
  • 03-12-2021, 10:53:10
    #14
    brown adlı üyeden alıntı: mesajı görüntüle
    <?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' ) ); ?>">
    Hocam 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)

    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)