The plugin exposes WordPress filters to let the developer alter specific data.
/../../wordless/helpers/pug/wordless_pug_options.php
Usage example
<?php
add_filter('wordless_pug_configuration', 'custom_pug_options', 10, 1);
function custom_pug_options(array $options): array {
$options['expressionLanguage'] = 'js';
return $options;
}
/../../wordless/helpers/acf_gutenberg_block_helper.php
Usage example
<?php
add_filter('wordless_acf_gutenberg_blocks_views_path', 'custom_blocks_path', 10, 1);
function custom_blocks_path(string $path): string {
return 'custom_path';
}
This way Wordless will search for blocks' partials in views/custom_path/block_name.html.pug
so you can use render_partial('custom_path/block_name')
to render them in your template.
The default path is blocks/
.
Note
The path will be always relative to views/
folder