Customizing templates

GeoDirectory template files contain the code and template structure for the frontend of your site and HTML emails sent by your system.
Templates can be found at .../wp-content/plugins/ geodirectory/templates
Email templates can be found at .../ wp-content/plugins/geodirectory/templates/emails
When you open these files, you will notice they all contain hooks that allow you to customize content without needing to edit the template files themselves. This method protects you from losing your customization when updating your plugins, because the template files can be left completely untouched.

Editing template files

To keep your customization safe from plugin updates, you should create copies of the templates in your theme folder.  Do not edit these files within the core plugin itself as they are overwritten during the upgrade process and any customizations will be lost.

Copy the template into a folder within your (child) theme named /geodirectory/ keeping the same file structure as within the plugin files, but remove the /templates/ sub-folder.

Example 1: frontend template

To override the map bubble template file when you use the Whoop theme, copy the
.../wp-content/plugins/geodirectory/templates/map-popup.php file to .../wp-content/themes/whoop/geodirectory/map-popup.php

The copied file will now override the GeoDirectory default template file.

Example 2: Email template

To override the email footer template file when you use the Supreme theme, copy the 
.../wp-content/plugins/geodirectory/templates/emails/geodir-email-footer.php
file to
.../wp-content/themes/supreme-directory/geodirectory/emails/geodir-email-footer.php

The copied file will now override the GeoDirectory default email footer file.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us