Kiran
Forum Replies Created
-
AuthorPosts
-
This reply has been marked as private.
Hello There,
Custom map styles are only applicable to Directory, Archive & Detail maps.
Try following PHP snippet to apply listing detail map custom style to add listing map.
/** * Add Google custom map styles to add listing page map. */ function gd_snippet_20190722_custom_field_input_address( $html, $cf ) { $active_map = GeoDir_Maps::active_map(); if ( ! empty( $active_map ) && ( 'google' === $active_map || 'auto' === $active_map ) ) { $map_styles = get_option( 'gd_custom_maps_details_style' ); $map_styles = maybe_unserialize( $map_styles ); if ( ! empty( $map_styles ) && ( is_array( $map_styles ) || is_object( $map_styles ) ) ) { $map_styles = json_encode( $map_styles ); $search = "google.maps.event.addListener(baseMarker, 'dragstart', function () {"; $replace = '$.goMap.map.setOptions({ styles: ' . $map_styles . ' }); ' . $search; $html = str_replace( $search, $replace, $html ); } } return $html; } add_filter( 'geodir_custom_field_input_address', 'gd_snippet_20190722_custom_field_input_address', 20, 2 );Kiran
Hi WPApps,
I have checked on my test site with steps you mentioned, but issue is replicated there.
Please provide a site link and admin credentials with more details like page urls to check there.
Thanks,
KiranHello Rudi,
Use following PHP snippets to change number of items to show on countries, regions, cities & neighbourhoods on admin side.
/** * Number of countries to display on countries page. */ function gd_snippet_location_countries_settings_items_per_page( $per_page ) { $per_page = 50; return $per_page; } add_filter( 'geodir_location_countries_settings_items_per_page', 'gd_snippet_location_countries_settings_items_per_page', 10, 1 ); /** * Number of regions to display on regions page. */ function gd_snippet_location_regions_settings_items_per_page( $per_page ) { $per_page = 50; return $per_page; } add_filter( 'geodir_location_regions_settings_items_per_page', 'gd_snippet_location_regions_settings_items_per_page', 10, 1 ); /** * Number of cities to display on cities page. */ function gd_snippet_location_cities_settings_items_per_page( $per_page ) { $per_page = 50; return $per_page; } add_filter( 'geodir_location_cities_settings_items_per_page', 'gd_snippet_location_cities_settings_items_per_page', 10, 1 ); /** * Number of neighbourhoods to display on neighbourhoods page. */ function gd_snippet_location_neighbourhoods_settings_items_per_page( $per_page ) { $per_page = 50; return $per_page; } add_filter( 'geodir_location_neighbourhoods_settings_items_per_page', 'gd_snippet_location_neighbourhoods_settings_items_per_page', 10, 1 );Regards,
KiranJuly 22, 2019 at 5:55 am in reply to: Post Adress shortcode takes Neighbourhood slug instead name #498833Hi jotomas,
I have checked on my test site and %%neighbourhood%% shows neighbourhood name as expected.
Please provide FTP credentials so we can look there.
Kiran
This reply has been marked as private.1. add url link to avatar
Try following PHP code snippet.
/** * Add author link to review author avatar. */ function gd_snippet_190719_get_avatar( $avatar, $id_or_email, $size, $default, $alt, $args ) { if ( ! empty( $id_or_email ) && is_object( $id_or_email ) && ! empty( $id_or_email->user_id ) && ! empty( $id_or_email->comment_post_ID ) && geodir_is_gd_post_type( get_post_type( $id_or_email->comment_post_ID ) ) ) { $avatar = '<a class="_gd-review-author" href="' . esc_url( get_author_posts_url( $id_or_email->user_id ) ) . '">' . $avatar . '</a>'; } return $avatar; } add_filter( 'get_avatar', 'gd_snippet_190719_get_avatar', 10, 6 );—
At present my site shows the date as the human readable time difference. How can I get it just to show the Date and Time posted?
Did you tried snippet i provided in my previous reply?
—
I do not understand how to do ‘customization with the use of hooks’. Any help would be appreciated.
We don’t provide support for customization. Yes, we sometimes provide snippet for easy customization. You can hire developer for more customization from here: https://geodirectoryexperts.com/
Kiran
This reply has been marked as private.This reply has been marked as private.This reply has been marked as private.This reply has been marked as private.Hello Silvia,
Try following PHP snippet.
/** * Show event date on invoice. */ function gd_snippet_190719_invoice_print_after_line_items( $invoice ) { global $wpdb; if ( empty( $invoice ) ) { return NULL; } $post_id = $wpdb->get_var( $wpdb->prepare( "SELECT post_id FROM " . GEODIR_PRICING_POST_PACKAGES_TABLE . " WHERE invoice_id = %d ORDER BY id DESC LIMIT 1", array( (int) $invoice->ID ) ) ); if ( ! empty( $post_id ) && GeoDir_Post_types::supports( get_post_type( $post_id ), 'events' ) ) { $event_schedules = do_shortcode( '[gd_post_meta id="' . $post_id . '" key="event_dates" show="value" css_class="gd-invoice-event"]' ); if ( ! empty( $event_schedules ) ) { $event_schedules = str_replace( '<div class="geodir-schedule-sep">-</div>', '<div class="geodir-schedule-sep"> - </div>', $event_schedules ); $event_schedules = str_replace( '<div class="geodir-schedule">', 'GDSCHEDULE<div class="geodir-schedule">', $event_schedules ); $event_schedules = str_replace( 'GDSCHEDULE', '<br>', strip_tags( $event_schedules ) ); ?> <div class="row wpinv-geodir-event-date"> <div class="col-sm-12"> <?php echo $event_schedules; ?> </div> </div> <?php } } } add_action( 'wpinv_invoice_print_after_line_items', 'gd_snippet_190719_invoice_print_after_line_items', 10, 1 );Kiran
This reply has been marked as private.July 19, 2019 at 11:52 am in reply to: Maps not working, can't add listing, Tags not working #498558Hello,
FTP credentials are no longer working. Please provide FTP credentials again if you have changed.
Kiran
July 19, 2019 at 11:31 am in reply to: Problem with WPML: GD listings do not switch language #498554Hi jotomos,
It seems cache issue. I have re-saved permalinks & cleared cached from “Swift Perforrmance > Clear All Cahce” and issue is fixed.
Please check and let us know.
Regards,
Kiran -
AuthorPosts