=== Summarize Posts === Contributors: fireproofsocks Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=355ULXBFXYL8N Tags: Requires at least: 3.0.1 Tested up to: 3.2.1 Stable tag: 0.7 Version: 0.8-dev Offers highly flexible alternatives to WordPress' built-in get_posts() function, including the ability to paginate results. == Description == Summarize posts offers a better-architected and more flexible alternative to the built-in WordPress `get_posts()`, `query_posts()`, and `WP_Query` methods for retrieving posts. The new functions are exposed both to your theme files and to your posts via shortcode tags. You can search by taxonomy terms, post title, status, or just about any other criteria you can think of. You can also paginate the results and format them in a flexible and tokenized matter. These functions are loop-agnostic: they can be used inside or outside of the loop. You can easily search by taxonomy term, you can easily sort results by custom fields, and you can paginate results. `// Example Usage $Q = new GetPostsQuery(); $Q->set_output_type(ARRAY_A); $results = $Q->get_posts(); foreach ($results as $r): ?>
  • ` `'fireproofsocks'); SummarizePosts::summarize($args); ?>` This plugin is still in development! If you download, please be willing to file bug reports at http://code.google.com/p/wordpress-summarize-posts/issues/list == Installation == 1. Upload this plugin's folder to the `/wp-content/plugins/` directory or install it using the traditional WordPress plugin installation. 1. Activate the plugin through the 'Plugins' menu in the WordPress manager. 1. Now you can use the shortcode to list all types of posts, or you can instantiate the GetPostsQuery() object in your theme files. == Frequently Asked Questions == = What search parameters are available? = The main function is documented on the project wiki: [get_posts()](http://code.google.com/p/wordpress-summarize-posts/wiki/get_posts) There are lots of options there, many of them derived from WordPress' built in get_posts() function. = How do I paginate results? = If your query might return LOTS of results, it makes sense to paginate the results. This can be done by setting the *paginate* option, then by printing the results of the *get_pagination_links()* function. `$Q = new GetPostsQuery(); $Q->limit = 5; // determines the results per page displayed $Q->paginate = true; $results = $Q->get_posts(); // ... format results print $Q->get_pagination_links(); // print the pagination links` Using *paginate="true"* inside of a shortcode will cause the pagination links to appear _after_ the posts, wrapped inside of a div: `