Title: Indexing post statuses
Author: WordPress VIP Documentation
Published: February 4, 2022
Last modified: July 4, 2025

---

 1. [Enterprise Search](https://docs.wpvip.com/enterprise-search/)
 2. [Choose what to index](https://docs.wpvip.com/enterprise-search/indexing/)
 3. Indexing post statuses

#  Indexing post statuses

Enterprise Search will automatically index all **public** post statuses.

**Note**

Use the [“Protected content” feature](https://docs.wpvip.com/vip-search/vip-search-features/#h-protected-content)
to enable indexing for **all** private post statuses.

## Adding or excluding post statuses to the allow list

If you want to customize the post statuses being indexed, use the `ep_indexable_post_status`
filter.

For example, if you wanted to index all post statuses of `inherit`:

    ```lang-php
    function mysite_indexable_post_statuses( $status ) {
         $status = array_unique( array_merge( $status, [ 'inherit' ] ) );
         return $status;
    }
    add_filter( 'ep_indexable_post_status', 'mysite_indexable_post_statuses', 10, 1 );
    ```

The filter above uses a list with the below array format:

    ```lang-php
    [
    	'publish'
    ]
    ```

Alternatively, if you want to exclude certain post statuses, use the same _allow
list_ to block indexing by programatically removing the entry. For example, to prevent
a post status from being indexed:

    ```lang-php
    function mysite_events_indexable_post_types( $status ) {
    	$deny_list = array( 'custom-post-status' );
    	// unset the items with values matching the deny list
    	$types = array_diff( $status, $deny_list );
    	return $status;
    }
    add_filter( 'ep_indexable_post_status', 'mysite_events_indexable_post_status', 10, 1 );
    ```

A re-index will be required afterward to ensure that the post status does display
from the previous indexing.

Last updated: July 04, 2025