Standalone mode resolves its front end templates the way WooCommerce does. Copy a template into an mlsimport/ folder in your theme and your copy is used instead of the plugin’s, with no plugin files edited.
The lookup checks the child theme first, then the parent theme, then falls back to the plugin’s bundled templates/ directory.
Before you start
- Standalone mode is active. These templates are the standalone front end and are not used on a supported theme.
- You are working in a child theme, or a theme you control. An override in a theme you did not write is lost on its next update.
- You have read the hooks reference. A hook that does the job is a better answer than a copied template.
Override a template
- Find the template you want in the plugin’s
templates/directory. - Create
mlsimport/inside your theme, atwp-content/themes/your-theme/mlsimport/. - Copy the file across, keeping the same filename and the same sub folder if it has one.
- Edit your copy.
Expected result: the front end renders your copy. Nothing needs clearing and no setting needs changing, because the lookup runs on every render.
What you can override
single-mlsimport-property.phpandarchive-mlsimport-property.php, the property pages.single-mlsimport-agent.phpandarchive-mlsimport-agent.php, the agent pages.card.php,card-v2.phpandcard-v3.php, the three property card designs.search-form.php, the search form.parts/agent-box.php, the agent box used inside the property page.live/single-mlsimport-property-live.php, the single property template used in live mode.
The card file that renders is the one your design settings selected, so overriding card.php changes nothing on a site set to card style V2 or V3. Check Property card style in the standalone design settings first: V1 uses card.php, V2 uses card-v2.php and V3 uses card-v3.php.
Filters around the lookup
Four filters sit on the resolution path when copying a file is not the right shape of change.
mlsimport_template_name( string $name ), swap one template for another before the lookup runs.mlsimport_template_subdir( string $subdir ), change the folder name your theme uses, which defaults tomlsimport/.mlsimport_locate_template( string $path, string $name, string $subdir ), return any absolute path you like, including one from a plugin of your own.mlsimport_template_include( string $located, string $template ), the last word on the single property route.
Serving templates from an add-on plugin rather than the theme is the usual reason to use the third one:
add_filter( 'mlsimport_locate_template', function ( $path, $name, $subdir ) {
$mine = plugin_dir_path( __FILE__ ) . 'mlsimport/' . $name;
return file_exists( $mine ) ? $mine : $path;
}, 10, 3 );
Headers and footers
The bundled templates call mlsimport_get_header() and mlsimport_get_footer() rather than the WordPress functions directly. They behave identically when the theme has a header.php and stay silent when it does not, which is what keeps block themes without those files from filling the error log with deprecation notices.
Keep those calls in a copied template unless you know the theme ships both files.
Every copied template stops receiving updates from the moment you copy it. When a bundled template gains a section, a fix or a new hook, your copy does not. Copy the smallest file that achieves the change, prefer a section filter to a whole page template, and write down which files you have overridden so an upgrade has something to check against.
If it does not work
- The override is ignored. Check the folder name and the filename character for character, and check you are editing the active theme rather than its parent.
- A card change does nothing. The design settings are on a different card style. See the tip above.
- The page renders but the styling is gone. Your copy dropped the wrapper classes the bundled stylesheet targets. Copy the original again and edit inside the markup rather than replacing it.
- A fatal error after an update. Your copy calls something the plugin has changed. Compare it against the current bundled file.
Frequently asked questions
Do overrides survive a plugin update?
The files do, because they are in your theme. Whether they still work is the question, since they no longer track changes to the bundled version.
Can I override only one part of the property page?
Yes, and it is the better route. The property page is built from sections, and a single section’s markup is replaceable through a filter without touching a template.
Does the folder have to be called mlsimport?
By default yes, and the mlsimport_template_subdir filter changes it if a theme’s conventions need something else.
Do these templates apply in live mode?
Live mode has its own single property template in the live/ folder, and it is overridable by the same rule with the same sub folder in your theme.
Related
- Standalone hooks reference
- Property card styles V1, V2 and V3
- Arranging the single property page
- The Design Settings page
Send us the template you are overriding and what you need it to do if the hooks look like they should cover it and do not.