mehrshaddarzi
10/25/2018 - 6:37 AM

wp query

wp query

<?php
//https://codex.wordpress.org/Class_Reference/WP_Query

$args = array (
	'meta_query' => array(array('key' => 'show-ticker','value' => 'بله')),
	'posts_per_page' => $this->redux['ticker-number-show'],
	'order'  => 'DESC',
	'orderby' => 'id'
);

// The Query
$query = new WP_Query( $args );
$count = $query->post_count;
$i = 1;
while ($query->have_posts()):
$query->the_post();



endwhile;
wp_reset_postdata();