…because good design helps sell your ideas.



Make WordPress Obey: List Posts on Static Pages

Posted on October 14, 2009 by Blog Design Journal

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:


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:

[get_posts tag="my favorite tag" numberposts=5 orderby="title]

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 :-)

Sam is one of NuRelm’s founders. After a few years designing computer chips for organizations the size of small countries, he was tempted by the irresistible lures of starting a business: more work, less salary, and the ability to be as creative as he pleased provided the bills still got paid. This has worked out surprisingly well over the past 10 years, resulting in a successful company and a lot of happy clients. Sam’s electrical engineering background and years of Web application development experience, combined with the wonders of an MBA, allow him to perform feats such as installing wiring while expounding on the viability of selling Web-based software to simplify the process.

Article Source:http://www.articlesbase.com/blogging-articles/make-wordpress-obey-list-posts-on-static-pages-1335059.html

Leave a Reply

You must be logged in to post a comment.

  • Advertise Here

  • Business Directory for Houston, Texas
  • Blogarama - The Blog Directory

↑ Top