PHPackages                             sagar290/alpine-custom-post - 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. sagar290/alpine-custom-post

ActiveLibrary

sagar290/alpine-custom-post
===========================

This library is useful for creating wordpress custom posttype very easily and effeciently.

56PHP

Since Jan 18Pushed 4y ago1 watchersCompare

[ Source](https://github.com/sagar290/AlpineCustomPost)[ Packagist](https://packagist.org/packages/sagar290/alpine-custom-post)[ RSS](/packages/sagar290-alpine-custom-post/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Alpine Custom Post Class
========================

[](#alpine-custom-post-class)

This class helps you to make custom post type within a second. No need to worry about all those wordpress api functions for registered custom post, just give the name of your post type and **BOOM**!

#### Example

[](#example)

```
    $book = new AlpineCustomPost("book");
```

And see the result 😃

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

[](#installation)

```
    composer require sagar290/alpine-custom-post:dev-master

```

Documentation
-------------

[](#documentation)

#### Basic

[](#basic)

```
    namespace Sagar290\CustomPost\AlpineCustomPost;

    $book = new AlpineCustomPost("book");
```

#### With Custom Labels and Argument

[](#with-custom-labels-and-argument)

```
        $labels = [
            'name'                  => _x($plural, 'post type general name'),
            'singular_name'         => _x($name, 'post type singular name'),
             'add_new'               => _x('Add New', strtolower($name)),
             'add_new_item'          => __('Add New ' . $name),
             'edit_item'             => __('Edit ' . $name),
             'new_item'              => __('New ' . $name),
             'all_items'             => __('All ' . $plural),
             'view_item'             => __('View ' . $name),
             'search_items'          => __('Search ' . $plural),
             'not_found'             => __('No ' . strtolower($plural) . ' found'),
             'not_found_in_trash'    => __('No ' . strtolower($plural) . ' found in Trash'),
             'parent_item_colon'     => '',
             'menu_name'             => $plural
        ];
       $args = [
                'label'                 => $plural,
                'labels'                => $labels,
                'public'                => true,
                'show_ui'               => true,
                'supports'              => array('title', 'editor'),
                'show_in_nav_menus'     => true,
                '_builtin'              => false,
           ];

     $book = new AlpineCustomPost("book", $args, $labels);
```

### Extra Features

[](#extra-features)

Some extra features, which will make your life more beautiful.

#### Add Column

[](#add-column)

You also can add custom column in edit.php page

```
    $book->add_column("price", "callback");

    function callback( $column, $post_id ) {
        if ( 'price' === $column ) {
            echo "your price here";
        }
    }
```

Conclusion
----------

[](#conclusion)

I made this class for my personal project. You can use this as well for your personal project or development.

Last but not least
------------------

[](#last-but-not-least)

As I am a noob developer, its normal to make mistake. please feel free raise issue if any problem happen and also **contribution which is highly welcome**.

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6b6f57b5e998811972fc43fa808829f4560d46efb7b7fbe2ecb80c1da72dedde?d=identicon)[sagar290](/maintainers/sagar290)

---

Top Contributors

[![sagar290](https://avatars.githubusercontent.com/u/7631656?v=4)](https://github.com/sagar290 "sagar290 (19 commits)")

### Embed Badge

![Health badge](/badges/sagar290-alpine-custom-post/health.svg)

```
[![Health](https://phpackages.com/badges/sagar290-alpine-custom-post/health.svg)](https://phpackages.com/packages/sagar290-alpine-custom-post)
```

PHPackages © 2026

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