PHPackages                             wp-forge/wp-loop - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. wp-forge/wp-loop

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

wp-forge/wp-loop
================

A generator function that makes working with the WordPress loop a dream.

1.0(5y ago)1217.6k1GPL-2.0-or-laterPHP

Since Jul 9Pushed 5y ago2 watchersCompare

[ Source](https://github.com/wp-forge/wp-loop)[ Packagist](https://packagist.org/packages/wp-forge/wp-loop)[ RSS](/packages/wp-forge-wp-loop/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

WordPress Loop
==============

[](#wordpress-loop)

A generator function that makes working with the WordPress loop a dream.

**When will this land in WordPress core?**

At the moment, that is unclear. However, you can follow the progress of this [trac ticket](https://core.trac.wordpress.org/ticket/48193).

Installation
------------

[](#installation)

- Run `composer require wp-forge/wp-loop`
- Make sure you require the `vendor/autoload.php` file in your project.

Usage
-----

[](#usage)

Here are a few examples of how to use the `wp_loop()` function:

### With the Global `WP_Query` Instance

[](#with-the-global-wp_query-instance)

```
