Created
November 17, 2017 16:43
-
-
Save ekandreas/e80cccbc32d96439cc5e05c0814e04c7 to your computer and use it in GitHub Desktop.
Vanilla Model Post
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
function model_post_latest($post_type = 'post', $max = 5) | |
{ | |
return get_posts([ | |
'post_type' => $post_type, | |
'posts_per_page' => $max, | |
]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment