Kiran
Forum Replies Created
-
AuthorPosts
-
Hello Christina,
Importing a large number of records does not hang up the site. It depends on the server configuration. Large data on site needs some high configuration.
Please read more here https://wpgeodirectory.com/docs-v2/faq/server-requirements/
Kiran
Hi @gowrann,
Replace following script in file \wp-content\plugins\geodir_location_manager\includes\widgets\class-geodir-location-widget-location-switcher.php around line no. 265
function gdlm_ls_maybe_suggest_more() { if ( gdlmls_doing_search == 0 && gdlmls_country.length == 0 && gdlmls_region.length == 0 && gdlmls_city.length == 0 && gdlmls_neighbourhood.length == 0 ) { $input = jQuery(gdlmls_selected).val(); if ($input) { <?php $near_add = geodir_get_option( 'search_near_addition' ); if ( trim( $near_add ) != '' ) { ?> $input = $input + ', <?php echo addslashes( $near_add ); ?>'; <?php } /** * Adds any extra info to the near search box query when trying to geolocate it via google api. * * @since 1.0.0 */ $near_add2 = apply_filters( 'geodir_search_near_addition', '' ); if ( trim( $near_add2 ) != '' ) { ?> $input = $input + <?php echo addslashes( $near_add2 ); ?>; <?php } ?> gdlm_ls_google_suggestions($input); } else { jQuery(gdlmls_selected).parent().find("ul.gdlmls-more").empty(); } } }
Kiran
This reply has been marked as private.Hi Christina,
This plugin used to check duplicate fields values on add listing page. It only executed during add listing process.
You have disabled GeoDirectory core plugin so it raises error because Ajax Duplicate Alert plugin is dependent on GeoDirectory core.
BTW do you see improvement in speed?
Kiran
Hi Nick,
Please provide us FTP credentials as well to debug more.
Kiran
Hello,
Can you provide more details?
Kiran
Hello,
Try following PHP snippet to use multiselect field in main search bar. Just change field name property_features(at two instances) to your field name.
function gd_snippet_200429_search_form_inputs() { global $geodir_search_post_type; $field_name = 'property_features'; // CHANGE FIELD NAME HERE $value = ! empty( $_REQUEST[ 's' . $field_name ] ) && is_array( $_REQUEST[ 's' . $field_name ] ) ? stripslashes_deep( $_REQUEST[ 's' . $field_name ] ) : array(); $options = GeoDir_Adv_Search_Fields::get_custom_field_meta( 'option_values', $field_name, $geodir_search_post_type ); $options = geodir_string_values_to_options( $options ); if ( empty( $options ) ) { return; } $_options = ''; foreach ( $options as $option ) { $option_label = isset( $option['label'] ) ? $option['label'] : ''; $option_value = isset( $option['value'] ) ? $option['value'] : ''; if ( $option_label != '' ) { if ( ! empty( $option['optgroup'] ) ) { if ( $option['optgroup'] == 'start' ) { $_options .= '<optgroup label="' . esc_attr( $option_label ) . '">'; } else { $_options .= '</optgroup>'; } } else { if ( $option_value != '' ) { $_options .= '<option value="' . esc_attr( $option_value ) . '" ' . selected( true, in_array( $option_value, $value ), false ) . '>' . $option_label . '</option>'; } } } } ob_start(); ?> <div class="gd-search-input-wrapper gd-search-input-wrapper-multiple gd-search-field-<?php echo $field_name; ?>"> <select name="s<?php echo $field_name; ?>[]" class="cat_select" id="geodir_search_<?php echo $field_name; ?>" multiple="true" style="height:4.9rem"> <?php echo $_options; ?> </select> </div> <?php $html = ob_get_clean(); echo $html; } add_action( 'geodir_search_form_inputs', 'gd_snippet_200429_search_form_inputs', 21 ); function gd_snippet_200429_search_posts_where( $where, $wp_query ) { global $wpdb, $table; $field_name = 'property_features'; // CHANGE FIELD NAME HERE $value = ! empty( $_REQUEST[ 's' . $field_name ] ) && is_array( $_REQUEST[ 's' . $field_name ] ) ? stripslashes_deep( $_REQUEST[ 's' . $field_name ] ) : array(); if ( ! empty( $value ) ) { $loops = array(); foreach ( $value as $_value ) { $_value = sanitize_text_field( $_value ); if ( $_value !== '' ) { $loops[] = $wpdb->prepare( "FIND_IN_SET( %s, {$table}.{$field_name} )", array( $_value ) ); } } if ( ! empty ( $loops ) ) { $where .= " AND " . ( count( $loops ) > 1 ? '( ' : '' ) . implode( " OR ", $loops ) . ( count( $loops ) > 1 ? ' )' : '' ); } } return $where; } add_filter( 'geodir_search_posts_where', 'gd_snippet_200429_search_posts_where', 20, 2 );
Regards,
KiranHi Christina,
I have enabled GeoDirectory and visited some pages in front-end & back-end. Pages are loaded normally in both front-end & back-end. Any specific page url that you see taking more time in loading?
Thanks,
KiranHello,
Provide us a site link, admin & FTP credentials to apply patch.
Kiran
This reply has been marked as private.This reply has been marked as private.Yes, to show listings from custom loop you need to set div id or class of the gd_listings container to tags attribute. So it shows posts within from gd_listings loop.
Kiran
Hello,
I have added new parameter
tags="#gd_list_test .geodir-listings"
in gd_map shortcode on detail page template.
Please check and let us know.
Kiran
Provide us FTP credentials and also tell where you put that snippet.
Kiran
Hello,
Try following PHP snippet to disable city filter on detail page maps.
/** * Disable city filter on detail page on custom loop map. */ function gd_snippet_200429_map_params( $params, $map_args ) { if ( ! empty( $params['tags'] ) && ( strpos( $params['tags'], '.' ) === 0 || strpos( $params['tags'], '#' ) === 0 ) ) { $params['country'] = ''; $params['region'] = ''; $params['city'] = ''; $params['neighbourhood'] = ''; } return $params; } add_filter( 'geodir_map_params', 'gd_snippet_200429_map_params', 20, 2 );
Regards,
Kiran -
AuthorPosts