PHPackages                             powerbuoy/sleek-post-types - 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. powerbuoy/sleek-post-types

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

powerbuoy/sleek-post-types
==========================

Create post types by creating classes in /post-types/.

v7.0.0(1y ago)03.8k1GPL-2.0-or-laterPHP

Since Oct 29Pushed 1y agoCompare

[ Source](https://github.com/powerbuoy/sleek-post-types)[ Packagist](https://packagist.org/packages/powerbuoy/sleek-post-types)[ RSS](/packages/powerbuoy-sleek-post-types/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (49)Used By (1)

[Sleek Post Types](https://github.com/powerbuoy/sleek-post-types/)
==================================================================

[](#sleek-post-types)

BREAKING! v7 - exclude\_from\_search no longer set to false by default - sleek/post\_types/archive\_fields filter now gets passed the post type object - not just its name - as its second argument

[![Packagist](https://camo.githubusercontent.com/2fe29fcd4eadbbc206606011c71a23ec4b43489b2f3acb26629ac3ae433d6e3f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f767072652f706f77657262756f792f736c65656b2d706f73742d74797065732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/powerbuoy/sleek-post-types)[![GitHub license](https://camo.githubusercontent.com/4f395973a1fbf31f73e131ff3ae67946d9a07f1d5f2527b8cb1019cd495c3788/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f706f77657262756f792f736c65656b2d706f73742d74797065732e7376673f7374796c653d666c61742d737175617265)](https://github.com/powerbuoy/sleek-post-types/blob/master/LICENSE)[![GitHub issues](https://camo.githubusercontent.com/f1c685fa2deffe78483840ce06bce633594f2e049e2e056c02c0c6b6b9185610/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f706f77657262756f792f736c65656b2d706f73742d74797065732e7376673f7374796c653d666c61742d737175617265)](https://github.com/powerbuoy/sleek-post-types/issues)[![GitHub forks](https://camo.githubusercontent.com/6b9507013ddb0b7cb0837c6b9a5f84c27070f0e06df818fd222107a4175c76fd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f706f77657262756f792f736c65656b2d706f73742d74797065732e7376673f7374796c653d666c61742d737175617265)](https://github.com/powerbuoy/sleek-post-types/network)[![GitHub stars](https://camo.githubusercontent.com/229c3bccb9aa52fa79d7d13e389633fd47531756b4cac80bbeaff74e8800ab25/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f706f77657262756f792f736c65656b2d706f73742d74797065732e7376673f7374796c653d666c61742d737175617265)](https://github.com/powerbuoy/sleek-post-types/stargazers)

Create post types by creating classes in `/post-types/`.

Theme Support
-------------

[](#theme-support)

N/A

Hooks
-----

[](#hooks)

### `sleek/post_types/field_group`

[](#sleekpost_typesfield_group)

Filter the ACF field group for post types before they're added.

### `sleek/post_types/fields`

[](#sleekpost_typesfields)

Filter the ACF fields for post types before they're added.

### `sleek/post_types/archive_fields`

[](#sleekpost_typesarchive_fields)

Filter the ACF fields for the archive settings before they're added.

Functions
---------

[](#functions)

### `Sleek\PostTypes\get_file_meta()`

[](#sleekposttypesget_file_meta)

Return information about all files in `/post-types/` (internal use).

Classes
-------

[](#classes)

### `Sleek\PostTypes\PostType`

[](#sleekposttypesposttype)

Extend this class to create a post type.

#### `PostType::init()`

[](#posttypeinit)

This method is called once on every page load. It allows you to add hooks or do whatever you like related to your post type.

#### `PostType::config()`

[](#posttypeconfig)

Return an array of post type configuration here. The array is passed directly to [register\_post\_type](https://developer.wordpress.org/reference/functions/register_post_type/). A few additional properties are available:

##### `taxonomies`

[](#taxonomies)

This is a native WordPress property but unlike when calling `register_post_type()` any taxonomy set in here will be automatically created if it doesn't already exist.

##### `has_single`

[](#has_single)

Set this to false to disable single pages for the post type.

##### `hide_from_search`

[](#hide_from_search)

Hides the post type from search without the [side effects](https://core.trac.wordpress.org/ticket/20234) of the built-in `exclude_from_search`.

##### `has_settings`

[](#has_settings)

Set this to false to *not* add a "Settings" page for the post type.

##### `has_archive`

[](#has_archive)

If this is false the settings page will be empty, if not it will have a "Title", "Image" and "Description".

#### `PostType::fields()`

[](#posttypefields)

Return an array of ACF fields from here and they will be added to the post type.

#### `PostType::sticky_modules()`

[](#posttypesticky_modules)

Return an array of module names and they will be added to the post type. Render a sticky module using `Sleek\Modules\render('name-of-module')`.

#### `PostType::flexible_modules()`

[](#posttypeflexible_modules)

Return an array of module names and they will be available in a flexible content field named `flexible_modules`. An associative array can be used to create multiple flexible content fields;

```
[
	'left_column' => ['text-block', 'text-blocks'],
	'right_column' => ['related-posts', 'recent-comments']
]

```

Render a flexible module field using `Sleek\Modules\render_flexible('flexible_modules')` or `Sleek\Modules\render_flexible('left_column')` etc.

#### `PostType::sticky_archive_modules()`

[](#posttypesticky_archive_modules)

Return an array of module names and they will be added to the post type's settings page. Render a sticky module using `Sleek\Modules\render('name-of-module', 'mycpt_settings')`.

#### `PostType::flexible_archive_modules()`

[](#posttypeflexible_archive_modules)

Return an array of module names and they will be available in a flexible content field named `flexible_modules` on the post type's settings page. An associative array can be used here too.

Render modules on the settings page using `Sleek\Modules\render_flexible('flexible_modules', 'mycpt_settings')`.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance36

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~39 days

Recently: every ~69 days

Total

48

Last Release

585d ago

Major Versions

v2.0.0 → v3.0.02020-01-21

v3.2.0 → v4.0.02020-01-28

v4.0.0 → v5.0.02020-03-08

v5.3.4 → v6.0.02020-04-08

v6.7.1 → v7.0.02024-11-26

### Community

Maintainers

![](https://www.gravatar.com/avatar/a7d034a25f49ff2aa981870d3dd3aca41cff17638931a9fdb5f1d0de46fcc12c?d=identicon)[powerbuoy](/maintainers/powerbuoy)

---

Top Contributors

[![powerbuoy](https://avatars.githubusercontent.com/u/1027780?v=4)](https://github.com/powerbuoy "powerbuoy (89 commits)")

### Embed Badge

![Health badge](/badges/powerbuoy-sleek-post-types/health.svg)

```
[![Health](https://phpackages.com/badges/powerbuoy-sleek-post-types/health.svg)](https://phpackages.com/packages/powerbuoy-sleek-post-types)
```

###  Alternatives

[oaklabs/phalcon-throttler

Rate limiter PHP Phalcon Framework.

182.7k](/packages/oaklabs-phalcon-throttler)

PHPackages © 2026

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