PHPackages                             htmlburger/wpemerge-blade - 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. htmlburger/wpemerge-blade

ActiveLibrary[Framework](/categories/framework)

htmlburger/wpemerge-blade
=========================

Enables the use of Blade views in WP Emerge.

0.17.0(4y ago)56.8k10[1 PRs](https://github.com/htmlburger/wpemerge-blade/pulls)GPL-2.0-onlyPHPPHP ^7.0

Since Feb 11Pushed 4y ago4 watchersCompare

[ Source](https://github.com/htmlburger/wpemerge-blade)[ Packagist](https://packagist.org/packages/htmlburger/wpemerge-blade)[ Docs](https://github.com/htmlburger/wpemerge-blade)[ RSS](/packages/htmlburger-wpemerge-blade/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (2)Versions (12)Used By (0)

WP Emerge Blade
===============

[](#wp-emerge-blade)

Enables the use of Blade views in [WP Emerge](https://github.com/htmlburger/wpemerge).

Summary
-------

[](#summary)

- [Quickstart](#quickstart)
- [Options](#options)
- [Extending Blade](#extending-blade)
- [WooCommerce](#woocommerce)

Quickstart
----------

[](#quickstart)

1. Run `composer require htmlburger/wpemerge-blade` in your theme directory
2. Add `\WPEmergeBlade\View\ServiceProvider` to your array of providers in WP Emerge's configuration: ```
    \App::make()->bootstrap( [
        'providers' => [
            \WPEmergeBlade\View\ServiceProvider::class,
        ],
    ] );
    ```
3. If you are using the [WP Emerge Starter Theme](https://github.com/htmlburger/wpemerge-theme) you can **replace** your theme views with the ones inside `theme/views-alternative/blade/`.
4. If you are using the [WP Emerge Starter Theme](https://github.com/htmlburger/wpemerge-theme) you must enable the `filter_core_templates` configuration option in order to have `.blade.php` template support for WordPress core templates (`index.php`, `single.php` etc.).

Options
-------

[](#options)

Default options:

```
[
    // Automatically replace the default view engine for WP Emerge.
    'replace_default_engine' => true,

    // Pass .php views to the default view engine.
    // replace_default_engine must be true for this to take effect.
    'proxy_php_views' => true,

    // Filter core theme templates to search for .blade.php files.
    // This is only necessary in themes.
    'filter_core_templates' => false,

    // Options passed directly to Blade.
    'options' => [
        // 'views' defaults to the main ['views'] key of the configuration.
        'views' => [get_stylesheet_directory(), get_template_directory()],
        // 'cache' defaults to the main ['cache']['path'] key of the configuration.
        'cache' => 'wp-content/uploads/wpemerge/cache/blade',
    ],
]
```

You can change these options by specifying a `blade` key in your WP Emerge config array:

```
\App::make()->bootstrap( [
    // ... other WP Emerge options
    'blade' => [
        // ... other WP Emerge Blade options
        'options' => [
            // ... other Blade options
            'cache' => get_stylesheet_directory() . DIRECTORY_SEPARATOR . 'blade-cache',
        ],
    ],
] );
```

Extending Blade
---------------

[](#extending-blade)

You can use the following to extend blade with a custom directive, for example:

```
// \App::resolve() used for brevity's sake - use a Service Provider instead.
$blade = \App::resolve( WPEMERGEBLADE_VIEW_BLADE_VIEW_ENGINE_KEY );
$blade->compiler()->directive( 'mydirective', function( $expression ) {
    return "";
} );
```

With this, you now have your very own custom Blade directive:

```
@mydirective('foobar')
```

More information on how you can extend Blade is available on

WooCommerce
-----------

[](#woocommerce)

In order to render WooCommerce templates using Blade you must **NOT** use the `.blade.php` extension for WooCommerce templates as it will not detect them. Instead, use the usual `.php` extension for your files, for example:

- `my-theme/woocommerce.php`
- `my-theme/woocommerce/single-product.php`
- `my-theme/woocommerce/archive-product.php`

Even though these files are `.php`, this extension will render them using Blade.

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 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 ~169 days

Recently: every ~316 days

Total

10

Last Release

1493d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/336248db7ed8822f03252c68698723130503a82c6d291ff24c7b17edaa3c8226?d=identicon)[atanas.angelov.dev](/maintainers/atanas.angelov.dev)

---

Top Contributors

[![atanas-dev](https://avatars.githubusercontent.com/u/22746396?v=4)](https://github.com/atanas-dev "atanas-dev (69 commits)")

---

Tags

frameworkwordpresstemplateviewwpemerge

### Embed Badge

![Health badge](/badges/htmlburger-wpemerge-blade/health.svg)

```
[![Health](https://phpackages.com/badges/htmlburger-wpemerge-blade/health.svg)](https://phpackages.com/packages/htmlburger-wpemerge-blade)
```

###  Alternatives

[htmlburger/wpemerge

A micro framework which modernizes WordPress as a CMS development by providing tools to implement MVC and more.

456137.8k8](/packages/htmlburger-wpemerge)[slim/twig-view

Slim Framework 4 view helper built on top of the Twig 3 templating component

3708.0M210](/packages/slim-twig-view)[slim/php-view

Render PHP view scripts into a PSR-7 Response object.

2739.7M95](/packages/slim-php-view)[rubellum/slim-blade-view

Slim Framework 3 view helper built on the Blade component

1822.4k2](/packages/rubellum-slim-blade-view)

PHPackages © 2026

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