PHP JavaScript CSS
Clone or download

TypeRocket WordPress Framework

Total Downloads

TypeRocket is a powerful framework for WordPress developers. We set out to make a framework designed to be beautiful within WordPress and deliver the tools needed to build a modern website or application.

TypeRocket makes it easy to do so much. Build component based designs. Add post types, taxonomies, meta boxes, pages, forms and fields. Create custom routes, models, controller, middleware and views.


Documentation and examples can be found at


TypeRocket is open-sourced software licenced under the GNU General Public License 3.0

Quick Examples

The short list. Let the code speak for itself. (WordPress hooks not required)

Post Type

// Register Post Type
$person = tr_post_type('Person');

// Chain Methods with Eloquence
     ->setTitlePlaceholder( 'Enter full name here' )
     ->setTitleForm( function() {
         $form = tr_form();
         echo $form->image('Photo');
         echo $editor->text('Company');
         echo $editor->textarea('About Person');

// Add Sortable Columns to Admin Index View
$person->addColumn('company', true);


Repeater Field

$form = tr_form();

// Basic
echo $form->repeater('Speakers')->setFields([
    $form->text('Slides URL')

// With Layout Tabs
$tabs = tr_tabs()->bindCallbacks();

     ->setTabFields('Content', [
         $form->textarea('Quote', ['maxlength' => 200]),
             $form->text('First Name'),
             $form->text('Last Name')

     ->setTabFields('Images', [

echo $form->repeater('Stories')

Front-end and MVC

Build custom apps.


// functons.php


<?php get_header(); ?>
    <main class="content">
        $form = tr_form('marketing', 'create');
        $list = 14829;
        $form->useUrl('POST', '/marketing/pdf/' . $list );
        echo $form->open();
        echo $form->text('Email')->setType('email');
        echo $form->close('Subscribe');
<?php get_footer(); ?>

Custom Routes

tr_route()->get('/marketing', 'show@Marketing');
tr_route()->post('/marketing/{list}', 'subscribe@Marketing');
tr_route()->get('/marketing/thanks', 'thanks@Marketing');


namespace App\Controllers;

use \TypeRocket\Controllers\Controller;

class MarketingController extends Controller

    protected function routing()
        $public = [ 'only' => [ 'show', 'subscribe', 'thanks' ] ];
        $this->setMiddleware('marketing', $public );
    public function show()
        return tr_view('');

    public function subscribe($list)
        $data = $this->request->getDataPost();

        $mail = new \MailChimp;
        $mail->subscribeMemberToList($list, $data['email']);
        return tr_redirect()->toUrl('/marketing/thanks');

    public function thanks()
        return tr_view('marketing.thanks');