Customizing templates
copy .../wp-content/plugins/geodirectory/templates/bootstrap/map/map-popup.php
to .../wp-content/themes/your-theme/geodirectory/bootstrap/map/map-popup.php
- Templates can be found at .../wp-content/plugins/ geodirectory/templates
- Email templates can be found at .../ wp-content/plugins/geodirectory/templates/emails
Editing template files
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.
However, bear in mind that when AyeCode UI (Bootstrap) is active, you need to copy the .../wp-content/plugins/geodirectory/templates/bootstrap/map/map-popup.php file to .../wp-content/themes/your-theme/geodirectory/bootstrap/map/map-popup.php
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.
Example 3: PHP for GD Custom Fields
$maybe_meta = geodir_get_post_meta( $object_id, $meta_key, $single ); Try the geodir_get_post_meta() function to retrieve the GD custom field value for the GD listing (see https://github.com/AyeCode/geodirectory/blob/master/includes/post-functions.php#L233). Example:$email = geodir_get_post_meta( $post_id, 'email', true ); Try the geodir_save_post_meta() function to update the GD custom field value for the GD listing (see https://github.com/AyeCode/geodirectory/blob/master/includes/post-functions.php#L104). Example:geodir_save_post_meta( $post_id, 'email', '[email protected]' );