PHPackages                             devmium/blade-wp - 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. [Templating &amp; Views](/categories/templating)
4. /
5. devmium/blade-wp

ActiveLibrary[Templating &amp; Views](/categories/templating)

devmium/blade-wp
================

Blade package for WordPress

12PHP

Since Apr 30Pushed 7y agoCompare

[ Source](https://github.com/devmium/blade-wp)[ Packagist](https://packagist.org/packages/devmium/blade-wp)[ RSS](/packages/devmium-blade-wp/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Blade templating engine for WordPress
=====================================

[](#blade-templating-engine-for-wordpress)

The simple yet powerful Blade templating engine ported to WordPress for themes developers.

Requirements
============

[](#requirements)

Before proceeding to installation, please make sure your environment met these requirements:

- [PHP](https://secure.php.net/manual/en/install.php) &gt;= 7.1+
- [Composer](https://getcomposer.org/download/)
- [WordPress](https://wordpress.org/) &gt;= 4.5+

Installation
============

[](#installation)

`composer require devmium/blade-wp`

Usage
=====

[](#usage)

```
use Devmium\Blade\WordPressBlade;

// Initialize WordPressBlade instance
$blade = WordPressBlade::getInstance();

// Render a specific template
WordPressBlade::render($view, $with = []);

// Register a custom directive
WordPressBlade::directive($name, $handler);
```

After initialing WordPressBlade service (usually in theme's functions.php file), it will automatically attempt to load template file first from **theme/views/{TEMPLATE\_FILE}.blade.php** then fallback to **theme/{TEMPLATE\_FILE}.php**

Examples
========

[](#examples)

Giving the following directory structure:

```
theme
- assets/
- includes/
- views/
    - single.blade.php
    - archive.blade.php
    - index.blade.php
- index.php
- style.css

```

Assuming a single post request (is\_single() === true), the service will load **theme/views/single.blade.php**. If **theme/views/single.blade.php** doesn't exist, the service will fallback to **theme/single.php** and then **theme/index.php**

Built-in WordPress custom directives
====================================

[](#built-in-wordpress-custom-directives)

Simple loop:
------------

[](#simple-loop)

```
@wp_posts()
    {{ the_title() }}
    {!! the_content() !!}
@wp_empty()
    {{ 'No posts' }}
@wp_end()
```

Notes
=====

[](#notes)

TBD

Blade documentation
===================

[](#blade-documentation)

You can browse [Blade's documentation](https://laravel.com/docs/5.7/blade) directly from Laravel documentation.

###  Health Score

19

—

LowBetter than 9% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

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://avatars.githubusercontent.com/u/33166640?v=4)[Mohamed Boudelaa](/maintainers/devmium)[@devmium](https://github.com/devmium)

---

Top Contributors

[![devmium](https://avatars.githubusercontent.com/u/33166640?v=4)](https://github.com/devmium "devmium (2 commits)")

---

Tags

bladewordpresswordpress-themewordpress-theme-development

### Embed Badge

![Health badge](/badges/devmium-blade-wp/health.svg)

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

###  Alternatives

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3851.2M](/packages/limenius-react-bundle)[area17/laravel-auto-head-tags

Laravel Auto Head Tags helps you build the list of head elements for your app

4616.0k](/packages/area17-laravel-auto-head-tags)[jelix/wikirenderer

WikiRenderer is a library to generate HTML or anything else from wiki content.

1712.2k1](/packages/jelix-wikirenderer)[webkinder/sproutset

A Composer package for handling responsive images in Roots Bedrock + Sage + Blade projects.

281.8k](/packages/webkinder-sproutset)

PHPackages © 2026

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