PHPackages                             codesoup/options - 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. codesoup/options

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

codesoup/options
================

Framework-agnostic WordPress options manager using custom post types. Supports ACF, custom metaboxes, and extensible integrations.

0107PHP

Since Mar 15Pushed 2mo agoCompare

[ Source](https://github.com/code-soup/options)[ Packagist](https://packagist.org/packages/codesoup/options)[ RSS](/packages/codesoup-options/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

CodeSoup Options
================

[](#codesoup-options)

**Version 1.0.0** - WordPress options manager using custom post types with built-in ACF integration.

Manage WordPress options using custom post types instead of the wp\_options table. Includes built-in Advanced Custom Fields integration and can be extended to use with any field framework (CMB2, MetaBox.io, Carbon Fields) or native metaboxes.

AI Skills Available via Skillshare
----------------------------------

[](#ai-skills-available-via-skillshare)

This package includes AI agent skills that can be installed via Skillshare:

```
# Install all skills
skillshare install code-soup/codesoup-options --all && skillshare sync

# Or install specific skills
skillshare install code-soup/codesoup-options -s codesoup-options-setup,codesoup-options-usage
```

**Available skills:**

- **codesoup-options-setup** - Set up and configure the plugin
- **codesoup-options-usage** - Retrieve and save options using the API
- **codesoup-options-migration** - Migrate configurations

See [SKILLSHARE.md](SKILLSHARE.md) for detailed installation instructions and [skills/README.md](skills/README.md) for skill documentation.

Why Custom Post Types?
----------------------

[](#why-custom-post-types)

- **Revision History** - Track changes over time
- **Post Locking** - Prevent concurrent edits
- **Better Organization** - Multiple option pages with capability control
- **Built-in ACF Integration** - Works out of the box with Advanced Custom Fields
- **Extensible** - Can be extended to use with CMB2, MetaBox.io, Carbon Fields, or native metaboxes

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

[](#requirements)

- PHP &gt;= 7.2
- WordPress &gt;= 6.0
- Optional: ACF, CMB2, MetaBox.io, or Carbon Fields

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

[](#installation)

### Via Composer

[](#via-composer)

```
composer require codesoup/options
```

### As WordPress Plugin

[](#as-wordpress-plugin)

1. Download and extract to `wp-content/plugins/codesoup-options`
2. Activate the plugin
3. Add configuration to your theme or plugin

Quick Start
-----------

[](#quick-start)

### Native Metaboxes (No Framework)

[](#native-metaboxes-no-framework)

```
use CodeSoup\Options\Manager;

$manager = Manager::create(
	'site_settings',
	array(
		'menu_label'   => 'Site Settings',
		'integrations' => array(
			'acf' => array( 'enabled' => false ),
		),
	)
);

$manager->register_page(
	array(
		'id'         => 'general',
		'title'      => 'General Settings',
		'capability' => 'manage_options',
	)
);

$manager->register_metabox(
	array(
		'page'  => 'general',
		'title' => 'Site Information',
		'path'  => __DIR__ . '/templates/site-info.php',
		'class' => 'site-info-metabox',
	)
);

$manager->init();

// Retrieve options
$options = Manager::get( 'site_settings' )->get_options( 'general' );
```

**Note:** You must create your own HTML fields in the template and implement a save handler using `Manager::save_options()`. See **[Native Metaboxes](docs/native.md)** for details.

### With ACF (Default)

[](#with-acf-default)

```
use CodeSoup\Options\Manager;

$manager = Manager::create( 'theme_settings' );

$manager->register_page(
	array(
		'id'          => 'general',
		'title'       => 'General',
		'capability'  => 'manage_options',
		'description' => 'General site settings and configuration',
	)
);

$manager->init();

// Retrieve options
$logo = Manager::get( 'theme_settings' )->get_option( 'general', 'site_logo' );
```

**Note:** Create ACF field groups and assign them using the "CodeSoup Options" location rule (select your page ID, e.g., "general"). ACF handles saving automatically - no save\_post hook needed. See **[ACF Integration](docs/acf.md)** for details.

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

[](#documentation)

- **[Examples](docs/examples/)** - Working code examples
- **[Native Metaboxes](docs/native.md)** - Using without any framework
- **[ACF Integration](docs/acf.md)** - Using with Advanced Custom Fields
- **[Custom Integrations](docs/custom-integrations.md)** - CMB2, MetaBox.io, Carbon Fields
- **[API Reference](docs/api.md)** - Complete method documentation
- **[Migration Guide](docs/migration.md)** - Migrating post\_type, prefix, and capabilities

Agent Skills
------------

[](#agent-skills)

AI-optimized documentation for agents is available in the `skills/` directory.

**Quick Install with Skillshare:**

```
# Install all skills globally
skillshare install code-soup/codesoup-options --all && skillshare sync

# Or install to project only
skillshare install code-soup/codesoup-options --all -p && skillshare sync
```

**Documentation:**

- **[SKILLSHARE.md](SKILLSHARE.md)** - Skillshare installation and usage guide
- **[skills/README.md](skills/README.md)** - Detailed skills documentation

Configuration
-------------

[](#configuration)

```
Manager::create(
	'instance_key',
	array(
		'post_type'      => 'custom_options',
		'prefix'         => 'custom_',
		'menu_label'     => 'Settings',
		'menu_icon'      => 'dashicons-admin-settings',
		'menu_position'  => 50,
		'parent_menu'    => null,
		'revisions'      => true,
		'cache_duration' => HOUR_IN_SECONDS,
		'debug'          => false,
		'integrations'   => array(
			'acf' => array(
				'enabled' => true,
				'class'   => 'CodeSoup\\Options\\Integrations\\ACF\\Init',
			),
		),
	)
);
```

License
-------

[](#license)

GPL-3.0+

Support
-------

[](#support)

- **Issues:** GitHub Issues
- **Website:** codesoup.co

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance58

Moderate activity, may be stable

Popularity14

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

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/00b8448f7b4a45eae365d2016244dddf72ab4f8556747fa41521f23863b09a65?d=identicon)[bobz-zg](/maintainers/bobz-zg)

---

Top Contributors

[![Bobz-zg](https://avatars.githubusercontent.com/u/420604?v=4)](https://github.com/Bobz-zg "Bobz-zg (9 commits)")

### Embed Badge

![Health badge](/badges/codesoup-options/health.svg)

```
[![Health](https://phpackages.com/badges/codesoup-options/health.svg)](https://phpackages.com/packages/codesoup-options)
```

PHPackages © 2026

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