PHPackages                             alleyinteractive/wp-find-one - 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. [Database &amp; ORM](/categories/database)
4. /
5. alleyinteractive/wp-find-one

ActiveLibrary[Database &amp; ORM](/categories/database)

alleyinteractive/wp-find-one
============================

Query for and return one WordPress post, term, or other object, bypassing intermediate arrays.

v3.0.0(1y ago)417.7k—6.5%GPL-2.0-or-laterPHPPHP ^8.2

Since Jun 28Pushed 1y ago21 watchersCompare

[ Source](https://github.com/alleyinteractive/wp-find-one)[ Packagist](https://packagist.org/packages/alleyinteractive/wp-find-one)[ RSS](/packages/alleyinteractive-wp-find-one/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (4)Versions (5)Used By (0)

Find One
========

[](#find-one)

The `find_one()` family of functions are wrappers for common WordPress retrieval functions like `get_posts()` or `get_terms()` that reduce the return value of those retrieval functions into a single result.

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

[](#installation)

Install the latest version with:

```
composer require alleyinteractive/wp-find-one
```

Basic usage
-----------

[](#basic-usage)

To find one item in a `person` post type:

```
