I want to grab the two latest blog posts on my homepage. i would also like the option to select the category if I want to also, but mainly just pulling the latest 2 blog posts.
Thanks
I want to grab the two latest blog posts on my homepage. i would also like the option to select the category if I want to also, but mainly just pulling the latest 2 blog posts.
Thanks
You must be logged in to post a comment.
paste this code in your theme’s functions.php file
then edit your home page and add this shortcode to show the two latest posts:
and if you want to select the category the paste this short code:
and replace the CHANGETHIS with your category id or name.
Well Kevin no one here is going to write code for you.
To make a shortcode you can use your functions.php
An example would be:
In order to get posts based on date/category/etc you can find the parameters reference here
http://codex.wordpress.org/Function_Reference/query_posts
if someone came here looking for the solution here is very nice plugin
http://wordpress.org/extend/plugins/display-posts-shortcode/