Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

shihabmalayil on "post per page and offset not working"

$
0
0

Hi,
this is my code. here posts_per_page = > 3 & offset => 3 not working.
help me to fix this issue.
Thanks


<?php
$myquery['tax_query'] = array(
	'relation' => 'OR',
	'posts_per_page' => 3,
	'offset' => 3,
	array(
		'taxonomy' => 'brands',
		'terms' => array('iHOME'),
		'field' => 'slug',
		));
query_posts($myquery);?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<b><?php the_title();?></b>
<p><?php echo excerpt(25); ?></p>
<?php echo esc_html( get_post_meta( get_the_ID(), 'category', true ) ); ?>
<?php endwhile; else: ?>
<?php endif; ?>	



Viewing all articles
Browse latest Browse all 8245

Trending Articles