-
Run from your local machine, in a new terminal tab
wp results results_init
To enable results builder layout, go to Builder.php
under to your sage theme. Search Results and uncomment it.
Uncomment this line of code:
// ->addLayout($this->get(Results::class), [
// 'label' => 'Results',
// 'display' => 'block',
// ])
To enable results in views template, go to resources/views/partials/builder
directory & edit layout_container.blade.php
.
replace this line of code:
@includeFirst([
'partials.builder.' . $build['acf_fc_layout'],
], $build)
with this line of code:
@includeFirst([
'partials.builder.' . $build['acf_fc_layout'],
'Results::partials.builder.' . $build['acf_fc_layout']
], $build)
Before proceeding with this step it is important to note there are two options to choose from. It will import the template to the sage theme.
- Option 1: Use
wp results results_default
orphp wp-cli.phar results results_default --allow-root
to import the template without type. - Option 2: Use
wp results results_with_type
orphp wp-cli.phar results results_with_type --allow-root
to import the template with type.
Run from your local machine, in a new terminal tab
wp results results_default
Run from your local machine, in a new terminal tab
wp results results_with_type
We can use results_tax_before_insert
hook in the filter.php to alter taxonomy. For example we want to remove taxonomy type
For removing type taxonomy. Paste this inside the filter.php
add_filter( 'results_tax_before_insert', function ( $types ) {
unset($types[1]);
return $types;
});