Last active
February 23, 2016 00:24
-
-
Save jonasmello/813baa5f4141a16e0cb8 to your computer and use it in GitHub Desktop.
Wordpress Loop
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
wp_reset_query(); | |
$args = array( | |
"post_type" => "post_type", | |
"orderby" => "menu_order" | |
); | |
$wp_query = new WP_Query(); | |
$wp_query->query($args); | |
if ( $wp_query->have_posts() ) | |
{ | |
?> | |
<?php | |
while ($wp_query->have_posts()) | |
{ | |
$wp_query->the_post(); | |
?> | |
<?php | |
} | |
?> | |
<?php | |
} | |
wp_reset_query(); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment