Make WordPress Obey: List Posts on Static Pages

advertisement

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:

[get_posts]

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

Reblog this post [with Zemanta]

Related Posts

Technorati Tags: , , , , , , ,

advertisement

3 Responses to “Make WordPress Obey: List Posts on Static Pages”

  1. Trackback Submitter Says:

    Post trackbacks and comments to remote blogs automatically with Trackback Submitter! This tool will submit your comments to millions of blogs automatically. Trackback Submitter – the most powerful tool on the planet to submit trackbacks automatically!

  2. Social Bookmarks Submitter Says:

    Submit Links to Social Bookmarking Websites Automatically! Get Thousands of Visitors! Increase Website Traffic and Income with Automatic Social Bookmarks Submitter. Prepare to upgrade your servers today – you will have thousands of real and highly targeted visitors who will make you the money like crazy!

  3. Search Engines Parser Says:

    Search Engines Parser is enormously fast, 100% automatic search engine results extractor you were dreaming about for many times. Search Engines Parser can extract results from all search engines at the same time, parse titles, descriptions and links automatically. You can specify which search engine(s) to use and what kind of data to parse. Search Engines Parser can output results to screen, export to MySQL database and write to CSV file.

Leave a Reply