Edit File: pm12.php
<?php if( class_exists( 'CSF' ) ) { CSF::createWidget( 'orun_widget_post_module_12', array( 'title' => esc_html__( 'Oruno - Yazı Modülü #8', 'orun' ), 'class' => 'orun-widget-fields', 'classname' => 'orun-widget-post-module-12', 'description' => esc_html__( 'Yazılarınızı görüntülemenizi sağlayan #8 numaralı modülümüz.', 'orun' ), 'fields' => array( array( 'id' => 'title', 'type' => 'text', 'title' => esc_html__( 'Başlık:', 'orun' ), 'subtitle' => esc_html__( 'Yazı modülünün başlığını girin.', 'orun' ), 'help' => esc_html__( 'Yazı modülünün başlığını girin. Boş bırakırsanız modülün başlığı görünmez.', 'orun' ), ), array( 'id' => 'postcount', 'type' => 'number', 'title' => esc_html__( 'Yazı Sayısı:', 'orun' ), 'subtitle' => esc_html__( 'Yazı modülünde görüntülenecek yazı sayısını girin.', 'orun' ), 'help' => esc_html__( 'Varsayılan: 5, modülde kaç tane yazı görüntüleneceği belirleyin.', 'orun' ), 'default' => 4, ), array( 'id' => 'order', 'type' => 'select', 'title' => esc_html__( 'Sıralama:', 'orun' ), 'subtitle' => esc_html__( 'Yazıların sıralamasını seçin.', 'orun' ), 'help' => esc_html__( 'Yazılar seçtiğiniz sıralama türüne göre sıralanır.', 'orun' ), 'options' => array( 'date' => esc_html__( 'Son Eklenme Tarihine Göre', 'orun' ), 'modified' => esc_html__( 'Son Güncellenme Tarihine Göre', 'orun' ), 'meta_value_num' => esc_html__( 'En Çok Görüntülenme Sayısına Göre', 'orun' ), 'comment_count' => esc_html__( 'En Çok Yorum Sayısına Göre', 'orun' ), 'rand' => esc_html__( 'Rastgele', 'orun' ), ), ), array( 'id' => 'cat', 'type' => 'select', 'title' => esc_html__( 'Kategori:', 'orun' ), 'subtitle' => esc_html__( 'Yazıların görüntüleneceği kategori/kategorileri seçin.', 'orun' ), 'placeholder' => esc_html__( 'Tüm Kategoriler', 'orun' ), 'help' => esc_html__( 'Birden fazla kategori seçebilirsiniz. Hiç kategori seçmezseniz tüm kategorilerdeki yazılar listelenecektir.', 'orun' ), 'options' => 'categories', 'multiple' => true, 'chosen' => true, ), array( 'id' => 'offset', 'type' => 'number', 'title' => esc_html__( 'Offset Ayarı:', 'orun' ), 'subtitle' => esc_html__( 'Yazıların listelenmesi için offset ayarını girin.', 'orun' ), 'help' => esc_html__( 'Örnek: 5, yazıların 5. sıradan başlayarak listelenecektir.', 'orun' ), 'default' => '0', ), ) ) ); if( ! function_exists( 'orun_widget_post_module_12' ) ) { function orun_widget_post_module_12( $args, $instance ) { if ( ! empty( $instance['title'] ) ) { echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ) . $args['after_title']; } echo '<div class="orun-pm orun-pm-12 row">'; if (have_posts()): $args = array( 'order' => 'DESC', 'post_type' => 'post', 'posts_per_page' => $instance['postcount'], 'orderby' => $instance['order'], 'offset' => $instance['offset'], 'cat' => $instance['cat'], 'meta_key' => 'post_views_count', ); $query = new WP_Query( $args ); while($query->have_posts()): $query->the_post(); get_template_part('template-parts/post/teknoloji/post', '1'); endwhile; endif; echo '</div>'; } } } ?>