# Registering Finder Categories
Elementor Core IntermediateWhen you create new finder categories you must register them. This is done by hooking to the registration hook in the finder manager and passing a new finder category instance.
# Registering New Finder Categories
Developers should use the following code to register new finder categories:
/**
* Register new Elementor finder categories.
*
* @param \Elementor\Core\Common\Modules\Finder\Categories_Manager $finder_categories_manager Elementor finder categories manager.
* @return void
*/
function register_new_finder_categories( $finder_categories_manager ) {
require_once( __DIR__ . '/finder/finder-1.php' );
require_once( __DIR__ . '/finder/finder-2.php' );
$finder_categories_manager->register( new \Elementor_Finder_Category_1() );
$finder_categories_manager->register( new \Elementor_Finder_Category_2() );
}
add_action( 'elementor/finder/register', 'register_new_finder_categories' );
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
This code hooks to the elementor/finder/register
action hook that holds the finder categories manager. The manager then registers new finder categories by passing the finder category instance.