Last active
August 22, 2017 13:14
-
-
Save seredniy/810c663a83d2334051e55aaaa913c437 to your computer and use it in GitHub Desktop.
get_posts
This file contains 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 global $post; $posts = get_posts( array('numberposts' => 5, 'post_type' => 'post') ); foreach($posts as $post){ setup_postdata($post); ?> | |
<?php } wp_reset_postdata(); ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment