Hey Guys,
I am currently using query_posts for a blog slider i have made in Owl, is it still ok to use query_posts() or is it better to use WP_Query? i have been told so and if so how easy is it to convert because my current code is :
<?php
query_posts('posts_per_page=-1');
while (have_posts()) : the_post();
$i = $wp_query->current_post;
echo ( 0 == $i % 3 ) ? '<div class="item">' : '';
?>
<div class="blog-item">
<h3><?php the_title(); ?></h3>
<a href="<?php the_permalink(); ?>">learn more</a>
</div>
<?php
echo ( $wp_query->post_count == $i || 2 == $i % 3 ) ? '</div>' : '';
endwhile;
wp_reset_query();
?>