Este plugin não foi testado com as 3 últimas grandes versões do WordPress. Pode já não ser suportado e pode ter problemas de compatibilidade quando usado com versões mais recentes do WordPress.



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.



Turns into…


    {{the_post_thumbnail() }}
    <img src="{{bloginfo( 'template_url' )}}/images/thumbnail-default.jpg" />

Turns into…

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

the loop

    <a href="{{the_permalink()}}">{{the_title()}}</a><br>

Turns into…

<a href="”>


wordpress query

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

Turns into….

    ‘post’) ); ?>
    have_posts() ) : ?>
    have_posts() ) : $query->the_post(); ?>

  • <a href="”>

Advanced Custom Fields

        <li>{{ get_sub_field( 'image' ) }}</li>

Turns into…

  • <img src="” />

Including other templates

To include a file with blade use:
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.





    <p>Lorem ipsum</p>

See the Blade documentation for more info.

Contribute on github:


  1. Upload folder blade to the /wp-content/plugins/ directory
  2. Active o plugin no menu Plugins
  3. Make sure that /wp-content/plugins/blade/storage/views/ is writable by php
  4. Done! You can now use Blade in your theme

Mais opções

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.


1 Dezembro, 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)
Ler todas as 7 avaliações

Contribuidores e programadores

“Blade” é software de código aberto. As seguintes pessoas contribuíram para este plugin:


Traduza o “Blade” para o seu idioma.

Interessado no desenvolvimento?

Consulte o código, consulte o repositório SVN, ou subscreva o registo de alterações por RSS.

Registo de alterações


  • Added support for BuddyPress


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


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


  • Added acf repeater (jaggyspaghetti)


  • Compatibility update for PHP 5.5 (relu)


  • Added @wpposts (mykebates)


  • Changed the structure of all files. (PabloVallejo)


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


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


  • initial (beta)