plugin banner

Brings Laravel's great template engine, Blade, to WordPress. Just install and start using blade in your theme.

Author:Mikael Mattsson (profile at
WordPress version required:3.0.0
WordPress version tested:3.9.9
Plugin version:0.3.7
Added to WordPress repository:23-06-2013
Last updated:01-12-2015
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:80
Rated by:7
Plugin URI:
Total downloads:4 454
Active installs:1 000+
plugin download
Click to start download

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...

<?php echo $foo ?>


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

Turns into...

<?php if(has_post_thumbnail()) : ?>
    <?php the_post_thumbnail() ?>
<?php else: ?>
    <img src="<?php bloginfo( 'template_url' ) ?>/images/thumbnail-default.jpg" />
<?php endif; ?>

the loop

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

Turns into...

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <a href="<?php the_permalink() ?>"><?php the_title() ?></a><br>
<?php endwhile; else: ?>
<?php endif; ?>

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....

<?php $query = new WP_Query( array('post_type' => 'post') ); ?>
<?php if ( $query->have_posts() ) : ?>
    <?php while ( $query->have_posts() ) : $query->the_post(); ?>
        <li><a href="<?php the_permalink() ?>"> <?php the_title() ?> </a></li>
    <?php endwhile; ?>
<?php else : ?>
    <li><?php _e('Sorry, no posts matched your criteria.') ?></li>
<?php endif; wp_reset_postdata(); ?>

Advanced Custom Fields

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

Turns into...

    <?php if( get_field( 'images' ) ): ?>
        <?php while( has_sub_field( 'images' ) ): ?>
            <li><img src="<?php the_sub_field( 'image' ) ?>" /></li>
        <?php endwhile; ?>
    <?php endif; ?>

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.



    <div class="content">



    <p>Lorem ipsum</p>

See the Blade documentation for more info.

Contribute on github: