Inject Query Posts

WordPress's template tags are intended to be used within 'the loop'. The loop is managed by a WP_Query object which sets up various global variables and its own object variables for use by the various template tags. The primary purpose of a WP_Query object is to actually query the database for the posts that match the currently specified criteria. However, if you don't need to query for posts since you already have them by some other means, you can still take advantage of the template tags by injecting those posts into the WP_Query via this plugin.

Depending on the template tags you are looking to use, or the logic you are hoping to employ within a loop, you may need to manually configure some of the query object's variables.

Example:

<?php // Say we're in the sidebar

// We've gotten some post objects on our own.
$posts = c2c_get_random_posts( 5, '' );

// Inject the posts
c2c_inject_query_posts( $posts );

// Now let's display them via template tags:
if ( have_posts() ) :
    while ( have_posts() ) : the_post(); ?>

        <li><a href=https://wordpress.org/plugins/inject-query-posts/"<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></li>

    <?php endwhile;?>
<?php endif; ?>

Links: Plugin Homepage | Plugin Directory Page | Author Homepage

WPQuery Shortcode

WPQuery Shortcode is a lightweight plugin that wraps the functionality of WP_Query in an easy-to-use shortcode. Several filters are built in to allow all kinds of messing with how the output is displayed. From a simple "Recent Posts" block on your page to displaying upcoming events from your calend.........

Similar: 50%

Quick Query

Quick Query is a snappy interface for WP_Query that makes querying with WordPress straightforward and concise. It's built on top of WP_Query (with a few exceptions), and provides a much more flexible and accomodating interface for querying posts. Learn more about Quick Query and see code examples h.........

Similar: 50%

Query Editor

Adds a simple set of options to modify the default query. Be careful, this affects all list type pages on the site and not just the home page. You can: Customise the post types used Exclude terms from any taxonomy Change the ordering Set an offset to skip posts Turn paging off Use a simple meta q.........

Similar: 43%

Post Index Helpers

This plugin provides thirteen handy template tags that relate to the index/position of a post within a loop's listing of posts. Some of the template tags provided by this plugin relate to the position of the current post within the current loop: c2c_is_first() c2c_is_last() c2c_is_at_index() c2c_.........

Similar: 38%

Lyza Loop

Lyza Loop is a WordPress plugin for theme developers and template-savvy folks that aims to: Dramatically shorten the time required to code custom loops Modularize custom loop markup using what I hope is a straightforward templating process Provide convenient batching variables Respect the context .........

Similar: 34%

Custom Post Limits

Control the number of posts that appear on the front page, search results, and author, category, tag, and date archives, independent of each other, including specific archives. By default, WordPress provides a single configuration setting to control how many posts should be listed in each section o.........

Similar: 30%

Whale-Kit

Three alternative to standard widget Categories, Recent Posts and Pages. These widgets can be used as short tags: WK_trem working with categories, post_tag or any taxonomies. Settings from function get_terms(). WK_posts works with posts, pages and any other type of records. Settings from class WP_.........

Similar: 28%

Query Inside Post

Displays a custom list of posts to the current one. It use the new Shortcode API of WP2.5 and the WP_Query New, it works too in your template file ! More infos....

Similar: 28%

Post-lister

This plugin, inspired on the plugin "Query Inside Post" by k-ny displays custom lists of posts or comments inside a post or the sidebar. This plugin requires PHP5. Look at the FAQ for more details....

Similar: 22%

Ajax Load More

Ajax Load More is a robust and intuitive solution for infinite scrolling posts, custom post types and pages with Ajax powered queries. Build complex WordPress queries using the Ajax Load More custom shortcode builder then add the shortcode to your pages via the content editor or directly into your .........

Similar: 12%