2016-03-26 22 views
-3

Bu boyuta ihtiyacım var ... add_image_size ('sami_post_standard', 760, 400, true); meta kutusuna ............................................... ................ ................................. .............................meta kutusu özel görüntü boyutu nasıl olsun

bu meta kutusu kodu

/** 
    * Post Type Gallery 
    */ 

    $meta_boxes['metabox-post-gallery'] = array(
     'id'   => 'metabox-post-gallery', 
     'title'  => __('Gallery Settings', 'sami'), 
     'pages'  => array('post',), 
     'context' => 'normal', 
     'priority' => 'high', 
     'show_names' => true, 
     'fields'  => array(
      array(
       'name'   => __('Slider Images', 'sami'), 
       'desc'   => __('Upload Your Gallery Slider images.', 'sami'), 
       'id'   => $prefix . 'gallery_slider', 
       'type'   => 'file_list', 
       'preview_size' => array(100, 100), 
      ), 
     ), 
    ); 
///////////////////////// 
in single.php file call 
///////////////////////// 
$gallery_slider = get_post_meta($post->ID, 'sami_gallery_slider', true); 

      <div class="slider_post"> 
       <div class="post_silder"> 
        <ul id="post-slid-post"> 
         <?php 
          foreach ($gallery_slider as $gallery_slider) { 
           echo "<li>"; 
           echo '<div class="item"><img src="'. esc_url($gallery_slider) .'" alt="'. esc_attr(get_the_title()) .'"></div>'; 
           echo "</li>"; 
          } 
         ?> 
        </ul> 
       </div> 
      </div> 
+1

özel sorununu çözmek veya ihtiyacınız tam olarak ne vurgulamak için ek ayrıntılar ekleyiniz çözümdür. Şu anda yazıldığı gibi, tam olarak ne sorduğunuzu söylemek zor. Bu sorunun açıklığa kavuşturulması için [Nasıl Sorulur] (http://stackoverflow.com/help/how-to-ask) sayfasına bakın. –

cevap

0

Bu

<?php 
     if ($gallery_sliders) { 
      foreach ($gallery_sliders as $attachment_id => $img_full_url) { 
      echo "<li>"; 
      echo '<div class="item">'. $full = wp_get_attachment_link($attachment_id, 'ashmawi_post_standard'); echo esc_url($full[0]) .'</div>'; 
      echo "</li>"; 
      } 
     } 
    ?> 
İlgili konular