Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
//Simple WPQuery filter by category Slug
<?php
wp_reset_postdata();
$args = array(
'category_name' => 'actualidad',
'orderby' => 'date',
'post_type' => 'post',
'posts_per_page' => -1
);
$the_query = new WP_Query( $args );
while ( $the_query->have_posts() ) : $the_query->the_post();?>
<div class="item">
<!-- do stuff -->
</div>
<?php endwhile; ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.