PHPackages                             inpsyde/cpt-archives - 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. inpsyde/cpt-archives

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

inpsyde/cpt-archives
====================

Allows a post-like editing experience for post type archives.

0.1.1(6y ago)1912.2kGPL-2.0-or-laterPHPPHP &gt;=7

Since Sep 1Pushed 2y ago1 watchersCompare

[ Source](https://github.com/inpsyde/CptArchives)[ Packagist](https://packagist.org/packages/inpsyde/cpt-archives)[ RSS](/packages/inpsyde-cpt-archives/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (3)Used By (0)

CPT Archives
============

[](#cpt-archives)

> A Composer package that provides a post-like editing experience for post type archives.

---

UNMAINTAINED
------------

[](#unmaintained)

**Note:** This version of the plugin is not maintained anymore.

---

Features
--------

[](#features)

- Post-like editing experience for post type archives with support for title, content, excerpt, custom fields, post thumbnail, revisions.
- Extensible: it is possible to add metaboxes to edit screen like for any other post type
- Automatically filters `post_type_archive_title` and `get_the_archive_description` to return, respectively, the *title* and the *excerpt* of assigned in backend (if any).
- Allows to add CPT archives link to WordPress nav menus, without using custom links.

---

Usage
-----

[](#usage)

"CPT Archives" is **not** a plugin, but a Composer package. It can be required by themes, plugins or at website level for sites entirely managed by Composer.

After it is installed via Composer, and composer autoload is required, CPT Archives needs to be bootstrapped, like this:

```
CptArchives\Bootstrap\bootstrap();
```

- This can be done in any plugin, MU plugin or theme `functions.php` with no need to wrap the call in any hook.
- There's no need to check if the library is *already* bootstrapped, the snippet above can be called multiple times without any negative effect.

After this single line of code is in place, all "CPT Archives" are fully working and its API is available for use.

---

API
---

[](#api)

There are 2 API, one OOP and one procedural that wraps it.

OOP API is provided by method of the object **`CptArchives\Archive`** which has no public constructor and can be instantiated using one of its two named constructors:

-`CptArchives\Archive::for_type()` which takes as only argument the post type to build the object for (as slug, so string, or as post type object). -`CptArchives\Archive::for_current_type()` which takes no arguments and only works in post type archive pages (when `is_post_type_archive()` is true).

Once an instance of the object is obtained, there are following methods available:

- `CptArchives\Archive::archive_title( string $before = '', string $after = '' ): string`
- `CptArchives\Archive::archive_content( string $more_link_text = null, bool $strip_teaser = false ): string`
- `CptArchives\Archive::archive_excerpt(): string`
- `CptArchives\Archive::archive_has_thumbnail(): bool`
- `CptArchives\Archive::archive_thumbnail_id(): int`
- `CptArchives\Archive::archive_thumbnail( string $size = 'post-thumbnail', array $attr = [] ): string`
- `CptArchives\Archive::archive_meta( string $key = '', bool $single = false ): mixed`

The signature is similar to post functions, and the naming should be self-explanatory.

The procedural API wraps the OOP API with functions in the `CptArchives` namespace. API functions are named exactly like `CptArchives\Archive` object methods.

The signature is identical, but a parameter is always prepended: the post type to get information from, that can be provided as string (post type slug) or as post type object.

For example:

- `CptArchives\archive_title( $post_type, string $before = '', string $after = '' ): string`

and so on...

Note that is also possible to pass `null` as first argument to API function, and the current post type will be used, this only work when viewing post type archive in frontend (that is when `is_post_type_archive()` is true).

---

Relevant Hooks
--------------

[](#relevant-hooks)

- **`'cpt-archives.can-edit-archive'`**. Filter. Allows to edit the capability necessary to edit a Post type archive (by default `$post_type->cap->edit_others_posts`).
- **`'cpt-archives.can-edit-archive'`**. Filter. Allows to edit for which post types the library should register admin screen and API. By default, all public, non builtin, post types that support archives.
- **`'cpt-archives.cpt-archive-args'`** Filter. Allows to edit the registration arguments for the intern CPT used to manage archives.

---

Requirements
------------

[](#requirements)

- PHP 7+
- Composer to install

---

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

[](#installation)

Via Composer, package name is **`inpsyde/cpt-archives`**.

---

License and Copyright
---------------------

[](#license-and-copyright)

Copyright (c) since 2017 Inpsyde GmbH.

"CPT Archives" code is licensed under [GPLv2+ license](LICENSE).

The team at [Inpsyde](https://inpsyde.com) is engineering the Web since 2006.

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~885 days

Total

2

Last Release

2335d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2208282?v=4)[Giuseppe Mazzapica](/maintainers/gmazzap)[@gmazzap](https://github.com/gmazzap)

![](https://www.gravatar.com/avatar/003585053f7d5d2127d31d5a4e79ba309acc075154f5752de8f429ac42c54dbe?d=identicon)[Syde](/maintainers/Syde)

---

Top Contributors

[![gmazzap](https://avatars.githubusercontent.com/u/2208282?v=4)](https://github.com/gmazzap "gmazzap (15 commits)")[![bueltge](https://avatars.githubusercontent.com/u/133425?v=4)](https://github.com/bueltge "bueltge (5 commits)")

---

Tags

navigationphp7post-typewordpress

### Embed Badge

![Health badge](/badges/inpsyde-cpt-archives/health.svg)

```
[![Health](https://phpackages.com/badges/inpsyde-cpt-archives/health.svg)](https://phpackages.com/packages/inpsyde-cpt-archives)
```

###  Alternatives

[monsieurbiz/sylius-alert-message-plugin

Adds a simple message on top of your shop.

1325.1k](/packages/monsieurbiz-sylius-alert-message-plugin)[swissup/module-font-awesome

FontAwesome for Magento2

117.1k1](/packages/swissup-module-font-awesome)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
