PHPackages                             tombroucke/wp-sidewheels - 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. [Framework](/categories/framework)
4. /
5. tombroucke/wp-sidewheels

ActiveLibrary[Framework](/categories/framework)

tombroucke/wp-sidewheels
========================

Framework for developing application in your WP install.

3.2.1(3y ago)52591[3 issues](https://github.com/tombroucke/wp-sidewheels/issues)PHP

Since Aug 20Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/tombroucke/wp-sidewheels)[ Packagist](https://packagist.org/packages/tombroucke/wp-sidewheels)[ RSS](/packages/tombroucke-wp-sidewheels/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (7)Versions (20)Used By (0)

WP Sidewheels
=============

[](#wp-sidewheels)

This package provides an easy way to create custom routes (MVC), roles, Custom post types, ... using a config file.

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

[](#installation)

### Add this package to your plugin dependencies

[](#add-this-package-to-your-plugin-dependencies)

`composer require tombroucke/wp-sidewheels`

### Initialize sidewheels your plugin:

[](#initialize-sidewheels-your-plugin)

`dirname(__FILE__)` is where your config.php file resides.

```
use Otomaties\Sidewheels\Sidewheels;

add_action('init', function(){
	Sidewheels::init(dirname(__FILE__));
});
```

### Add to your plugin activation hook:

[](#add-to-your-plugin-activation-hook)

```
use Otomaties\Sidewheels\Sidewheels;

register_activation_hook(__FILE__, function(){
	Sidewheels::install(dirname(__FILE__));
});
```

### Add to your plugin deactivation hook:

[](#add-to-your-plugin-deactivation-hook)

```
use Otomaties\Sidewheels\Sidewheels;

register_deactivation_hook(__FILE__, function(){
	Sidewheels::uninstall();
});
```

### add config.php to your plugin root directory

[](#add-configphp-to-your-plugin-root-directory)

Important notice
----------------

[](#important-notice)

After adding new routes, you need to manually flush your rewrite rules.

Example configuration file
--------------------------

[](#example-configuration-file)

```
