Overview

This filter lets you modify how the old result counts appears (e.g. “1-10 of 234”).

Parameters

  • $output | string | The result count HTML
  • $params | array | An associative array of result count settings (see below)

How to use custom PHP code?

PHP code can be added to your (child) theme's functions.php file. Alternatively, you can use the Custom Hooks add-on, or a code snippets plugin. More info

$params = [ 'lower' => 1, 'upper' => 10, 'total' => 234 ];

Usage

How to use custom PHP code?

PHP code can be added to your (child) theme's functions.php file. Alternatively, you can use the Custom Hooks add-on, or a code snippets plugin. More info

add_filter( 'facetwp_result_count', function( $output, $params ) { $output = $params['lower'] . '-' . $params['upper'] . ' of ' . $params['total'] . ' results'; return $output; }, 10, 2 );

More examples

See also