MLS Import Documentation Aug 7, 2026 · 8 min read

Standalone hooks reference

Every action and filter in the standalone front end, grouped by area, with signatures, conventions and worked examples.

B
Benjamin Levy
Contributor · MLSimport

Standalone mode exposes a WooCommerce style layer of actions and filters so themes and add-ons can extend, reorder, restyle and react to MLSImport without editing the plugin.

Every section builder, whether shortcode, Gutenberg block, Elementor widget or PHP template, routes through one dispatcher, and every search goes through one query executor. A hook added at those points applies on every surface at once.

Before you start

  1. Standalone mode is active. These hooks belong to the standalone front end and do not fire when the plugin is running against WpResidence, WpEstate, Houzez or Real Homes.
  2. Your code lives in a child theme’s functions.php or a small plugin of your own, never in MLSImport itself.
  3. The canonical machine readable list is includes/standalone/mlsimport-hooks.php in the plugin. This page is the signature reference.

Conventions

  1. Every hook is prefixed mlsimport_.
  2. Filters receive the subject as the first argument and must return it, modified or not. Context arguments follow it.
  3. Actions receive the most relevant subject first and return nothing.
  4. Section action slots are buffered. You echo inside them and the dispatcher captures that output into the section’s returned string, so nothing leaks out of order.
  5. The two SQL affecting filters are advanced. Their output is re validated for placeholder safety after your callback runs.
  6. No hook may set or clear the editorial mlsimport_label taxonomy.

Rendering a property

  1. mlsimport_property_sections filter ( array $sections ), add, remove or reorder the section manifest globally.
  2. mlsimport_section_args filter ( array $args, string $slug, int $id ).
  3. mlsimport_before_section and mlsimport_after_section actions ( string $slug, int $id, array $args ), buffered.
  4. mlsimport_before_section_{$slug} and mlsimport_after_section_{$slug} actions ( int $id, array $args ), buffered.
  5. mlsimport_section_{$slug}_html filter ( string $html, int $id, array $args ), replace one section’s markup.
  6. mlsimport_section_html filter ( string $html, string $slug, int $id, array $args ).
  7. mlsimport_property_data filter ( array $vm, int $id ), the view model every section reads.
  8. mlsimport_property_field_section filter ( string $section, string $field ), move a RESO field between detail sections.
  9. mlsimport_format_price filter ( string $string, mixed $value ).

Rendering a listings grid

  1. mlsimport_render_args filter ( array $args ).
  2. mlsimport_prepared_listings filter ( array $payload, array $args ).
  3. mlsimport_before_listings action ( array $args, int $total ).
  4. mlsimport_before_search_form and mlsimport_after_search_form actions ( array $args ).
  5. mlsimport_before_results and mlsimport_after_results actions ( array $args, int $total ).
  6. mlsimport_no_results_message filter ( string $html, array $args ).
  7. mlsimport_before_listing_card and mlsimport_after_listing_card actions ( WP_Post $post, object|null $row ), buffered.
  8. mlsimport_listing_card_html filter ( string $html, WP_Post $post, object|null $row ).
  9. mlsimport_card_template filter ( string $name, string $style ), which card file a grid renders.
  10. mlsimport_card_view filter ( array $view, WP_Post $post, object|null $row ), plus the in-card action slots mlsimport_card_before, mlsimport_card_after_media, mlsimport_card_body_start, mlsimport_card_body_end and mlsimport_card_after.
  11. mlsimport_listings_visible_fields filter ( array|null $keys, array $args ), which search fields a grid’s bar shows. Null means every field.
  12. mlsimport_map_markers filter ( array $markers, array $args ).

Query

  1. mlsimport_listings_query_params filter ( array $params ), the structured way to change a search.
  2. mlsimport_listings_results filter ( array $result, array $params ), holding rows and total.
  3. mlsimport_listings_feature_ttids filter ( int[] $ttids, array $params ).
  4. mlsimport_listings_per_page filter ( int $limit, array $params ).
  5. mlsimport_listings_query_where filter ( array $where, array $params ), advanced.
  6. mlsimport_listings_order filter ( string $order, array $params ), advanced and re validated.
Pro Tip

Reach for mlsimport_listings_query_params before either of the two SQL filters. It expresses the same intent in a form the query builder understands, so it keeps working when the underlying SQL changes, which the raw filters do not.

Templates and assets

  1. mlsimport_template_name filter ( string $name ) and mlsimport_template_subdir filter ( string $subdir ).
  2. mlsimport_locate_template filter ( string $path, string $name, string $subdir ), the full override of a resolved path.
  3. mlsimport_template_include filter ( string $located, string $template ).
  4. mlsimport_single_property_sections filter ( string[] $slugs, int $id ), the single page section order.
  5. mlsimport_before_single_property and mlsimport_after_single_property actions ( int $id ).
  6. mlsimport_before_archive and mlsimport_after_archive actions ( array $args ).
  7. mlsimport_standalone_styles filter ( bool $enqueue ), disable the bundled stylesheet.
  8. mlsimport_map_tile_url filter ( string $url ), the tile source every map draws from. The maps are Leaflet, so this is where a different tile provider is swapped in.
  9. mlsimport_property_schema filter ( array $schema, array $vm ), the JSON-LD graph printed into a single property’s head. Return an empty array to emit nothing.

Import lifecycle

  1. mlsimport_before_save_property and mlsimport_after_save_property actions ( int $property_id, array $property ).
  2. mlsimport_property_skip_write filter ( bool $skip, int $property_id, string $incoming_mod, array $property ).
  3. mlsimport_property_meta_value filter ( mixed $value, string $meta_key, int $property_id, array $property ).
  4. mlsimport_property_feature_label filter ( string $label, string $reso_field, mixed $value ).
  5. mlsimport_property_post_content filter ( string $content, array $property ).
  6. mlsimport_reso_targets_for filter ( array $targets, string $field ), where a RESO field is written.
  7. mlsimport_listings_row filter ( array $row, int $post_id, string $listing_key ) and mlsimport_after_listings_row_upsert action ( int $post_id, string $listing_key, array $row ).
  8. mlsimport_before_delete_listing_row and mlsimport_after_delete_listing_row actions ( int $post_id ).
  9. mlsimport_reindex_property action ( int $post_id ) and mlsimport_after_reindex action ( int $count ).

Leads and registration

  1. mlsimport_property_lead_fields filter ( string $fields, string $variant, int $id ).
  2. mlsimport_property_lead_validation filter ( array $errors, array $input, int $property_id ).
  3. mlsimport_property_lead_subject, mlsimport_property_lead_email_body and mlsimport_property_lead_recipient filters.
  4. mlsimport_property_lead_submitted action ( array $data, int $property_id ) and mlsimport_property_lead_mail_sent action ( bool $sent, array $data, int $property_id ).
  5. mlsimport_property_post_type_args and mlsimport_agent_post_type_args filters ( array $args ).
  6. mlsimport_taxonomies filter ( array $list ) and mlsimport_taxonomy_args filter ( array $args, string $taxonomy ).
  7. mlsimport_registered_cpts action, fired once registration is complete.

Live mode

Live mode answers reads straight from the MLS through pre filter seams. A callback that returns something other than null short circuits the stored path, and every live callback guards on the one gate below. Live mode itself is not switched on in the current release, so these seams exist and stay inert until it ships.

  1. mlsimport_live_mode_active filter ( bool $active ), the gate.
  2. mlsimport_live_cache_ttl filter ( int $ttl ) in seconds, and mlsimport_live_url_base filter ( string $base ).
  3. mlsimport_property_data_pre filter ( array|null $pre, int $id ).
  4. mlsimport_map_payload_pre filter ( array|null $pre, array $args, int $zoom ) and mlsimport_map_bounds_pre filter ( array|null $pre, array $params ).
  5. mlsimport_search_field_options filter ( array $pairs, array $def ).
  6. mlsimport_page_block_list_by_id_pre filter ( string|null $pre, array $args ).

Worked examples

Add a call to action under the price, on every surface at once:

add_action( 'mlsimport_after_section_price', function ( $id, $args ) {
	echo '<a class="cta" href="/mortgage?listing=' . esc_attr( $id ) . '">Estimate your payment</a>';
}, 10, 2 );

Remove a section everywhere, then reorder the single page specifically:

add_filter( 'mlsimport_property_sections', function ( $sections ) {
	unset( $sections['similar'] );
	return $sections;
} );

add_filter( 'mlsimport_single_property_sections', function ( $slugs, $id ) {
	array_unshift( $slugs, 'video' );
	return array_values( array_unique( $slugs ) );
}, 10, 2 );

Route a RESO field somewhere else on import, and turn off the bundled stylesheet:

add_filter( 'mlsimport_reso_targets_for', function ( $targets, $field ) {
	if ( 'GreenEnergyEfficient' === $field ) {
		return array( 'tax:mlsimport_feature' );
	}
	return $targets;
}, 10, 2 );

add_filter( 'mlsimport_standalone_styles', '__return_false' );
Pro Tip

Prefer a hook to a copied template whenever both would work. A hook keeps receiving plugin updates, and an overridden template stops the day its bundled version changes, which is the same trade off WooCommerce theme developers live with.

Frequently asked questions

Do these hooks fire on WpResidence or Houzez?

No. They belong to the standalone front end. On a supported theme the property pages are the theme’s, and its own hooks apply.

How do I see the current list rather than this page?

Read includes/standalone/mlsimport-hooks.php in the plugin. It is the canonical list, and it is kept accurate because the code is generated from the same conventions.

Can I register a section of my own?

Yes. Add it to the manifest through mlsimport_property_sections and return its markup from mlsimport_section_{$slug}_html.

Why does my echo inside a section hook appear in the right place rather than at the top of the page?

Because section slots are buffered. The dispatcher captures your output and folds it into the section’s returned string, which is what preserves the order on every surface.

  1. Template overrides in standalone mode
  2. Sending property leads to a CRM
  3. Standalone mode: run MLSImport on any theme
  4. Rebuilding the search index with WP-CLI
  5. What Live Mode is and when to use it

Open a ticket with the behaviour you are trying to change if none of the hooks above reaches it.

B
About the author
Benjamin Levy
Writes about MLS feeds, IDX compliance, and running real-estate websites on WordPress at scale.
All posts by Benjamin