Download the PHP package htmlburger/wpemerge-blade without Composer
On this page you can find all versions of the php package htmlburger/wpemerge-blade. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download htmlburger/wpemerge-blade
More information about htmlburger/wpemerge-blade
Files in htmlburger/wpemerge-blade
Package wpemerge-blade
Short Description Enables the use of Blade views in WP Emerge.
License GPL-2.0-only
Homepage https://github.com/htmlburger/wpemerge-blade
Informations about the package wpemerge-blade
WP Emerge Blade
Enables the use of Blade views in WP Emerge.
Summary
- Quickstart
- Options
- Extending Blade
- WooCommerce
Quickstart
- Run
composer require htmlburger/wpemerge-blade
in your theme directory -
Add
\WPEmergeBlade\View\ServiceProvider
to your array of providers in WP Emerge's configuration: - If you are using the WP Emerge Starter Theme you can replace your theme views with the ones inside
theme/views-alternative/blade/
. - If you are using the WP Emerge Starter 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
Default options:
You can change these options by specifying a blade
key in your WP Emerge config array:
Extending Blade
You can use the following to extend blade with a custom directive, for example:
With this, you now have your very own custom Blade directive:
More information on how you can extend Blade is available on https://laravel.com/docs/5.4/blade#extending-blade
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.