WordPress is a great tool with ton of community support. But sometimes, when you just can’t make it do your bidding, nobody has written a plugin to do what you want, and Google reveals no acceptable hacks, you just have to fire up Notepad and summon your inner PHP hacker. Coaxing WordPress into displaying certain posts on a static page is just one of those times.
WordPress static pages are not supposed to show dynamic stuff. But, sometimes, you want them to anyway. Here’s a plugin that does just that. This plugin adds the ability to put a tag in your page entry and have it display a list of posts using the get_posts template tag.
By default it will show the 10 most recent posts ordered in reverse date order, but it will accept any of the options provided by the get_posts template tag. To use it, just put the following into the HTML of any page or post, use as many times as you like
on the same page:
- Content Creation for Small Business
- JavaScript as a Classical OOP Language
- Self-Indulgent Code: Automatic Tables from SQL Query Data
- Top 4 Online Backup Services
- Self-Indulgent Code: jQuery getJSON with Error Handling
This default usage will return the last 10 posts in reverse chronological order. Along with all the options provided by the get_posts template tag, it will also accept one additional option:
ul_class: This is the class assigned to the bullet list. Default of “get_posts_class”.
An example with a few options:
Shows 5 posts with the tag “my favorite tag” ordered by title.
There are quite a few more options … check the wordpress.org extensions page for more detailed documentation on all the options.
Download the plugin here, and please let us know with a comment if you have any suggestions, comments, requests or questions. And, if you like it, hit the plugin page and give it a nice rating













Can I display the category the post is from? IE “Filed under…” I’m currently using…
fields=”post_title, post_date, post_excerpt, post_category”
And that is showing everything except the category
Hi, thanks for the amazing plugin.
Is it possible to list posts based on keyword? I’ve had a look at the codex pages and couldn’t see anything but wondered if there was anything i might have missed?
cheers
To format the date output, I can recommend the modified code suggested by WuLongTi (further down the comments). It works perfectly. Thanks!
A full reference of date formats can be found in .
I have tried inserting the [get_posts] tag as instructed, but when I publish my Pages, I just see “[get_posts]” . As if the HTML code isn’t working. I posted it into the HTML window in the editor. What am I doing wrong? I have the Category selected at the bottom of the page too.
I’m using the nurelm_get_post plugin to display category-specific recent posts on a “page”, but am having difficulty getting a couple of options to work as expected.
1) Excerpts. I’ve set the following options:
fields="post_date, post_title, post_excerpt"however only manual excerpts are being printed, not the auto-generated excerpt which WordPress usually prints when no excerpt has been manually added. I plan to use the auto-generated excerpt, and am uncertain how to get this plugin to display them.
2) Title links. Using the following options:
fields="post_date, post_title, post_excerpt" fields_make_link="false, true, false"I expect the post title to link to the full post, however it does not. I am able to successfully enable links for the post date, but no other fields.
I’m hoping that both of these issues are just user error, and somebody will be able to identify what I’m doing wrong.
Thanks in advance.
I would also like to know how/where to use the “display:block” element as the , . , does not work for me.
Hi,
Firs of all, thanks so much for this. It is great!
I am having some issues though if someone can help it would be great.
1. i have to use get-post instead of get_post that seems to be mentioned in the documentation.
2.Also, although the post shows nice on the blog page, on the static page, the post apears with no spaces, no returns.
3. I cant get it to display the date
4. It only pulls the very last post instead of the default 10.
thanks veyr much in advance for your help. I hope someone responds.
Tdu, try [get-posts].
Work with me =)
hi,
i would like to generate a list which would display only posts corresponding to 2 tags, i.e. only those posts tagged with “EU” AND “Press Release”.
what should i insert after tag= ?
[get_posts tag="EU" "Press Release"] lists all the posts that have at least one of these tags
.
thanks in advance!
another qquick question:
[get_posts tag="eu" tag="press-release" numberposts=100 fields="post_title, post_date" orderby="date"]
returns me bullets that look like:
- EU action in Mexico2010-05-19 13:20:34
whereas i would like them to look like:
- EU action in Mexico, 19 May 2010
what do i have to change?
thanks a lot!
Thanks it works very nicely
But is there any way to change the formatting of the posts?
Is it possible to include a thumbnail image with post excerpt?
I would really like use this plugin to publish posts just as they look on the front page, with the title, thumbnail image, and an excerpt to the side. I’m not a code guy but I think a code recipe that would allow people to do that, and only have to change the “tag” section to catch which ever posts they need would very helpful for more than just myself. For me it would be a life saver!
Is it possible to do that with this plugin?
Thanks,
shooterreviews.com