How it works
- All HTML output is generated using Template Files, which are located in the
templatesfolder within the plugin.
- To override the HTML output of the plugin, you need to include the correct Template File within a specified folder in your theme.
- This Template File will then override the default file for that specific part of your listing(s).
The easiest way to get started is to open up the ‘templates’ folder within the Auto Listings plugin (
wp-content/plugins/auto-listings/templates/) and take a look at the folder and file names within this
templates folder. This will give an indication of what each file does.
As an example, the
address.php file located in the ‘single-listing’ folder is used to output the HTML for each listings’ address. But you can override this HTML by creating an
address.php file of your own and adding it to your theme in the correct location.
The folder you need to add these files to in your theme is the ‘listings’ folder, which you will need to create.
To modify the HTML for each single listings’ address, we simply
- copy the
address.phpfile located here –
- paste the
address.php file will then override the default
address.php file and you can modify it as you need.
Folder & file hierarchy
You can do this with any file located within the plugin
templates folder, so long as you keep the file structure and hierarchy the same.
Plugin file structure:
Theme file structure:
So you are basically replacing the
templates folder and renaming it
listings within your theme. All internal files and folders can then follow the same naming conventions and hierarchy.