Facebook
From Botched Tapir, 1 Year ago, written in Plain Text.
This paste is a reply to Untitled from imahmoodzz - go back
Embed
Viewing differences between Untitled and Re: Untitled
CSF::createWidget('csf_widget_carousel_3', array(
    'title'       => 'ویجت کلاکت فیلم: ویجت کروسل مطالب دسته custom',
    'classname'   => 'csf-widget-classname',
    'description' => 'ویجت اختصاصی کلاکت فیلم برای نمایش کروسل مطالب دسته',
    'fields'      => array(

      array(
        'id'      => 'title',
        'type'    => 'text',
        'title'   => 'عنوان ویجت',
      ),
      array(
        'id'      => 'icon',
        'type'    => 'text',
        'subtitle' => 'از FontAwesome استفاده شود',
        'placeholder' => 'مثلا: film',
        'title'   => 'آیکون ویجت',
      ),
      array(
        'id'      => 'count',
        'type'    => 'text',
        'title'   => 'تعداد مطالب',
      ),
      array(
        'id'      => 'archive',
        'type'    => 'switcher',
        'title' => 'نمایش دکمه آرشیو',
        'text_on'  => 'فعال',
        'text_off' => 'غیرفعال',
        'text_width' => 75,
        'default' => false
      ),
      array(
        'id'          => 'film_cat',
        'type'        => 'select',
        'title'       => 'انتخاب دسته بندی',
        'placeholder' => 'دسته بندی را انتخاب کنید',
        'chosen'      => true,
        'ajax'        => false,
        'multiple'    => false,
        'sortable'    => true,
        'options'     => 'categories',
      ),
    )
  ));
  
  
  
  if (!function_exists('csf_widget_carousel_3')) {
    function csf_widget_carousel_3($args, $instance)
    { ?>
      
        
          

"> 


          
            " class="nav-link active carousel_archive">
          
        

        
          
                         $query = new WP_Query(array(
              'post_type' => 'post',
              'posts_per_page' => $instance['count'],
              'cat' => $instance['film_cat'],
            ));
            if ($query->have_posts()) :
              while ($query->have_posts()) : $query->the_post(); ?>
                ">
                  
                    
                    
                      
                    

                  

                
              
              
            


          

        
      
         }
  }