Kiran

Forum Replies Created

Viewing 15 posts - 1,756 through 1,770 (of 6,022 total)
  • Author
    Posts
  • in reply to: Major issues with upgrading #498883

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Map Styling not applying consistently #498863

    Kiran
    Moderator
    Post count: 7069

    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

    in reply to: Franchise issue #498844

    Kiran
    Moderator
    Post count: 7069

    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,
    Kiran

    in reply to: increase view of cities in admin section #498840

    Kiran
    Moderator
    Post count: 7069

    Hello 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,
    Kiran


    Kiran
    Moderator
    Post count: 7069

    Hi 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

    in reply to: Business Hours translation #498610

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Change to Review/comment Header #498606

    Kiran
    Moderator
    Post count: 7069

    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

    in reply to: updates to CPT saving, but not showing. #498602

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: I updated to V2 – Site is down #498600

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Google Maps error with adress field #498597

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Maps not working, can't add listing, Tags not working #498595

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Start and end date (expire date) on invoice #498586

    Kiran
    Moderator
    Post count: 7069

    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

    in reply to: Upgrade Issue – pagination stopped working #498560

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Maps not working, can't add listing, Tags not working #498558

    Kiran
    Moderator
    Post count: 7069

    Hello,

    FTP credentials are no longer working. Please provide FTP credentials again if you have changed.

    Kiran

    in reply to: Problem with WPML: GD listings do not switch language #498554

    Kiran
    Moderator
    Post count: 7069

    Hi 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

Viewing 15 posts - 1,756 through 1,770 (of 6,022 total)
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount