Title: Blade
Author: Mikael Mattsson
Published: <strong>23 juni 2013</strong>
Last modified: 1 december 2015

---

Plugins zoeken

![](https://ps.w.org/blade/assets/banner-772x250.png?rev=846965)

Deze plugin **is niet getest met de laatste 3 grotere versies van WordPress**. Mogelijk
wordt het niet meer onderhouden of ondersteund. Ook kunnen er compatibiliteitsproblemen
ontstaan wanneer het wordt gebruikt met recentere versies van WordPress.

![](https://s.w.org/plugins/geopattern-icon/blade_ffffff.svg)

# Blade

 Door [Mikael Mattsson](https://profiles.wordpress.org/konvent/)

[Download](https://downloads.wordpress.org/plugin/blade.0.3.7.zip)

 * [Details](https://nl.wordpress.org/plugins/blade/#description)
 * [Beoordelingen](https://nl.wordpress.org/plugins/blade/#reviews)
 *  [Installatie](https://nl.wordpress.org/plugins/blade/#installation)
 * [Ontwikkeling](https://nl.wordpress.org/plugins/blade/#developers)

 [Ondersteuning](https://wordpress.org/support/plugin/blade/)

## Beschrijving

Blade is the template engine for Laravel, a very popular php framework, developed
by Taylor Otwell. This plugin brings the same template engine to wordpress.
 Using
a template engine will result in much cleaner template files and quicker development.
Normal php can still be used in the template files. The plugin also adds a wordpress
specific snippet to blade. Check out the examples for more info.

#### echo/print

    ```
    {{$foo}}
    ```

Turns into…

#### if()

    ```
    @if(has_post_thumbnail())
        {{the_post_thumbnail() }}
    @else 
        <img src="{{bloginfo( 'template_url' )}}/images/thumbnail-default.jpg" />
    @endif
    ```

Turns into…

 <img src=”/images/thumbnail-default.jpg” />

#### the loop

    ```
    @wpposts
        <a href="{{the_permalink()}}">{{the_title()}}</a><br>
    @wpempty
        <p>404</p>
    @wpend
    ```

Turns into…

 <a href=””>

404

#### wordpress query

    ```
    <ul>
    @wpquery(array('post_type' => 'post'))
        <li><a href="{{the_permalink()}}">{{the_title()}}</a></li>
    @wpempty
        <li>{{ __('Sorry, no posts matched your criteria.') }}</li>
    @wpend
    </ul>
    ```

Turns into….

 *  ‘post’) ); ?>
    have_posts() ) : ?> have_posts() ) : $query->the_post(); ?>
 * <a href=””>

#### Advanced Custom Fields

    ```
    <ul>
        @acfrepeater('images')
            <li>{{ get_sub_field( 'image' ) }}</li>
        @acfend
    </ul>
    ```

Turns into…

 * <img src=”” />

#### Including other templates

To include a file with blade use:
 @include(‘header’) Note that you should not type“.
php”. Files included with functions, e.g. the_header(), will not be compiled by 
Blade, however the php code in the file is still executed.

#### Layouts

master.php:

 @yield(‘content’)

page.php:
 @layout(‘master’)

    ```
    @section('content')
        <p>Lorem ipsum</p>
    @endsection
    ```

See the [Blade documentation](http://three.laravel.com/docs/views/templating) for
more info.

Contribute on github: [github.com/MikaelMattsson/blade](https://github.com/MikaelMattsson/blade)

## Installatie

 1. Upload folder `blade` to the `/wp-content/plugins/` directory
 2. Activeer de plug-in via het ‘Plugins’ menu in WordPress
 3. Make sure that `/wp-content/plugins/blade/storage/views/` is writable by php
 4. Done! You can now use Blade in your theme

#### Meer opties

It is recommended thay you change the path to the location where the compiled views
are stored to within your theme. This will fix problems with wpml. To do so, put
the following code in your theme folder and create the folder/directory “bladecache”
in your theme folder.
 if(function_exists(‘blade_set_storage_path’)){ blade_set_storage_path(
get_template_directory().’/bladecache’); }

## Beoordelingen

![](https://secure.gravatar.com/avatar/f87b6d224fc01a728796bdc6664938d96111a6dbfe8a41fd12a8743923522d12?
s=60&d=retro&r=g)

### 󠀁[Awesome plugin but sadly stopped developing](https://wordpress.org/support/topic/awesome-plugin-but-sadly-stopped-developing/)󠁿

 [Jochems](https://profiles.wordpress.org/jochems/) 1 december 2018

I've used this plugin for a large amount of websites, unfortunately it seems it's
not being updated and I got an error in PHP 7.2. 4 Stars for making my develop life
much easier, could had 5 stars if there was an regular update of the plugin. I'm
now making a switch to Timber (Twig)

![](https://secure.gravatar.com/avatar/4dc3a14074686d18519c3a588a1f5382eabe8ba8b9fc4a6449368d8fe16f800c?
s=60&d=retro&r=g)

### 󠀁[L4](https://wordpress.org/support/topic/l4/)󠁿

 [EkAndreas](https://profiles.wordpress.org/ekandreas/) 3 september 2016

This is Blade L4?

 [ Lees alle 7 beoordelingen ](https://wordpress.org/support/plugin/blade/reviews/)

## Bijdragers & ontwikkelaars

“Blade” is open source software. De volgende personen hebben bijgedragen aan deze
plugin.

Bijdragers

 *   [ Mikael Mattsson ](https://profiles.wordpress.org/konvent/)

[Vertaal “Blade” in je eigen taal.](https://translate.wordpress.org/projects/wp-plugins/blade)

### Interesse in ontwikkeling?

[Bekijk de code](https://plugins.trac.wordpress.org/browser/blade/), haal de [SVN repository](https://plugins.svn.wordpress.org/blade/)
op, of abonneer je op het [ontwikkellog](https://plugins.trac.wordpress.org/log/blade/)
via [RSS](https://plugins.trac.wordpress.org/log/blade/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 0.3.7

 * Added support for BuddyPress

#### 0.3.6

 * Fixed bug with incorrectly appending to unitialized variable. (perholmang)
 * Fixed issues when using multiple @section. (perholmang)

#### 0.3.5

 * Added support for child/parent-themes (perholmang)

#### 0.3.4

 * Added acf repeater (jaggyspaghetti)

#### 0.3.3

 * Compatibility update for PHP 5.5 (relu)

#### 0.3.2

 * Added @wpposts (mykebates)

#### 0.3.1

 * Changed the structure of all files. (PabloVallejo)

#### 0.2.0

 * The view templates are now loaded differently.
 * Better errorhandling.
 * Added possibility to change the storage path.

#### 0.1.1

 * Added a fix for plugins that import the template file directly using the template
   path fetched using get_query_template() like WP e-Commerce;

#### 0.1.0

 * initial (beta)

## Meta

 *  Versie **0.3.7**
 *  Laatst geüpdatet **11 jaar geleden**
 *  Actieve installaties **200+**
 *  WordPress versie ** 3.0.0 of nieuwer **
 *  Getest t/m **3.9.40**
 *  Taal
 * [English (US)](https://wordpress.org/plugins/blade/)
 * Tags
 * [Blade](https://nl.wordpress.org/plugins/tags/blade/)[engine](https://nl.wordpress.org/plugins/tags/engine/)
   [Laravel](https://nl.wordpress.org/plugins/tags/laravel/)[template](https://nl.wordpress.org/plugins/tags/template/)
 *  [Geavanceerde weergave](https://nl.wordpress.org/plugins/blade/advanced/)

## Waarderingen

 4 van 5 sterren.

 *  [  4 5 sterren beoordelingen     ](https://wordpress.org/support/plugin/blade/reviews/?filter=5)
 *  [  1 4 ster beoordeling     ](https://wordpress.org/support/plugin/blade/reviews/?filter=4)
 *  [  1 3 ster beoordeling     ](https://wordpress.org/support/plugin/blade/reviews/?filter=3)
 *  [  0 2 sterren beoordelingen     ](https://wordpress.org/support/plugin/blade/reviews/?filter=2)
 *  [  1 1 ster beoordeling     ](https://wordpress.org/support/plugin/blade/reviews/?filter=1)

[Je beoordeling](https://wordpress.org/support/plugin/blade/reviews/#new-post)

[Bekijk alle beoordelingen](https://wordpress.org/support/plugin/blade/reviews/)

## Bijdragers

 *   [ Mikael Mattsson ](https://profiles.wordpress.org/konvent/)

## Ondersteuning

Iets te melden? Hulp nodig?

 [Het supportforum bekijken](https://wordpress.org/support/plugin/blade/)