Solr Search for WordPress 2.6.0 has 1 actions and 27 filters, read directly from its source code on Nov 18, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when Solr Search for WordPress fires an action
add_action( 'solr_power_index_all_finished', function() {
// Your code runs here.
}, 10, 1 );
// Change a value Solr Search for WordPress is about to use
add_filter( 'solr_index_custom_fields', function( $plugin_s4wp_settings ) {
// Change $plugin_s4wp_settings here.
return $plugin_s4wp_settings;
}, 10, 1 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
/** * Filter indexed custom fields */ apply_filters( 'solr_index_custom_fields', $plugin_s4wp_settings['s4wp_index_custom_fields'] ); -
/** * Filter is_solr_query */ apply_filters( 'is_solr_query', $enabled, $query ); -
/** * Filter connection options */ apply_filters( 's4wp_connection_options', $solarium_config ); -
/** * Filter solarium client */ apply_filters( 's4wp_solr', $solr ); -
/** * Allow Solr Search in WordPress Dashboard */ apply_filters( 'solr_allow_admin', false ); -
/** * Allow Solr Search with AJAX */ apply_filters( 'solr_allow_ajax', false ); -
/** * Filter the generated Solr document. */ apply_filters( 'solr_build_document', $doc, $post_info ); -
/** * Filter the Solarium dismax query object. */ apply_filters( 'solr_dismax_query', $dismax, $query ); -
/** * Filter indexed custom fields */ apply_filters( 'solr_facet_custom_fields', $facet_on_custom_fields ); -
/** * Filter facet HTML */ apply_filters( 'solr_facet_items', false, $facet_name, $data ); -
/** * Filter facet widget search box HTML */ apply_filters( 'solr_facet_searchbox', $html ); -
/** * Filter facet title */ apply_filters( 'solr_facet_title', false, $facet_name ); -
/** * Allows additional information to be included. */ apply_filters( 'solr_index_stat', $stat, $type ); -
/** * Override the custom schema file path */ apply_filters( 'solr_power_customer_schema_file_path', $custom_schema_file_path ); -
/** * Filter the Solarium query object. */ apply_filters( 'solr_query', $query, $dismax ); -
/** * Filter server schema */ apply_filters( 'solr_scheme', $default_scheme ); -
do_action( 'solr_power_index_all_finished' ); -
apply_filters( 'allowed_options', array() ); -
apply_filters( 'solr_boost_query', 'post_title^2 post_content^1.2' ); -
apply_filters( 'solr_facet_operator', $default_operator ); -
apply_filters( 'solr_is_private_blog', ( 1 != $current_blog->public || 1 == $current_blog->spam || 1 == $current_blog->archived ), $current_blog ); -
apply_filters( 'solr_max_search_results', 50000 ); -
apply_filters( 'solr_post_status', array( 'publish' ) ); -
apply_filters( 'solr_post_types', get_post_types( array( 'exclude_from_search' => false, ) ) ); -
apply_filters( 'solr_power_ajax_search_query_args', $args ); -
apply_filters( 'solr_power_search_template', 'solr-search-results.php' ); -
apply_filters( 'solr_power_search_tempplate_dir', 'templates' ); -
apply_filters( 'solr_select_query', $select );
Generated from Solr Search for WordPress's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: