Kiran

Forum Replies Created

Viewing 15 posts - 901 through 915 (of 6,022 total)
  • Author
    Posts
  • in reply to: Map API installed ok…. now map won't load. #521646

    Kiran
    Moderator
    Post count: 7069

    Hi Helen,

    There is an issue with WordPress 5.3.1 & Ninja Forms plugins. This breaks the REST API requests.

    We have fixed from our side till Ninja Forms team fix it. We have already asked Ninja Forms team to check & fix from their side.

    Please update GeoDirectory plugin to fix now.

    Regards,
    Kiran

    in reply to: Few strings not translating #521643

    Kiran
    Moderator
    Post count: 7069

    Hi milettic,

    The .po files are missing “X-Poedit-KeywordsList” parameter as mentioned at here https://wpgeodirectory.com/support/topic/translations-does-not-work/page/2/#post-501595.

    I have followed that and added X-Poedit-KeywordsList for Social Manage & Location Manager .po files.

    This has fixed 2) & 3) translation issue.

    To fix rest of points, please update all .po files in IT language and add this parameter.

    Admin credentials you provided has no admin access. It just redirects to home page.

    Let us know.

    Thanks,
    Kiran

    in reply to: 404 #521636

    Kiran
    Moderator
    Post count: 7069

    Hi Community,

    I checked and even normal WordPress pages also not working. See https://county.partners/terms-and-conditions/
    It looks like mod_rewrite module is not enabled on your Apache web server. Please here more https://wordpress.org/support/article/using-permalinks/#using-pretty-permalinks

    Ask your server admin to enable mod_rewrite module.

    Regards,
    Kiran

    in reply to: Recurring Packages and Expirations #521630

    Kiran
    Moderator
    Post count: 7069

    Hi laurence,

    “Recurring payments work a little different, they expire when the payment gateway send the notification that the bill was not paid OR that is was cancelled (and then we set a manual expire date for when it would have renewed).”

    Regards,
    Kiran

    in reply to: Map API installed ok…. now map won't load. #521352

    Kiran
    Moderator
    Post count: 7069

    Hi Helen,

    There is an PHP warning in map markers response. Please add following lines in WORDPRESS-ROOT/wp-config.php file

    
    
    define( 'WP_DEBUG_DISPLAY', false );
    @ini_set( 'display_errors', false );

    Let us know how.

    Kiran


    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.

    Kiran
    Moderator
    Post count: 7069

    Hi,

    I have updated patch and now bedrooms x+ search is working fine.

    Please check and let us know.

    Regards,
    Kiran

    in reply to: Search for 2 CPTs not working #521334

    Kiran
    Moderator
    Post count: 7069

    Hi Hui,

    Please check and let us know.

    Regards,
    Kiran

    in reply to: Search for 2 CPTs not working #521307

    Kiran
    Moderator
    Post count: 7069

    Hi Hui,

    I have checked and it adding “ORDER BY , rand()” in query on that search page which results in database error.

    did you have any customization related to this. Please let us know so i can check more.

    Kiran

    in reply to: Multirating totals and counts do not update correctly #521300

    Kiran
    Moderator
    Post count: 7069

    Hello,

    Provide us FTP credentials to apply patch from our side
    OR
    Follow instructions to apply patch from your side.
    – Open file \plugins\geodir_review_rating_manager\includes\general-functions.php
    – Replace following code around line between 367 – 423.

    
    
    function geodir_reviewrating_update_post_ratings( $post_id ) {
        global $wpdb;
    
        $post_type = get_post_type( $post_id );
        $detail_table = geodir_db_cpt_table( $post_type );
    
        $post_ratings = $wpdb->get_results( $wpdb->prepare( "SELECT r.ratings FROM " . GEODIR_REVIEW_TABLE . " AS r LEFT JOIN {$wpdb->comments} AS c ON c.comment_ID = r.comment_id WHERE r.post_id = %d AND c.comment_approved = '1' AND r.rating > 0", array( $post_id ) ) );
    
        $post_comments_rating = array();
    
        if ( ! empty( $post_ratings ) ) {
            $optional_multirating = apply_filters( 'geodir_reviewrating_comment_rating_fields', 0, $post_id ); // Allow review without rating star for multirating
    
            foreach ( $post_ratings as $rating ) {
                $ratings = maybe_unserialize( $rating->ratings );
    
                if ( ! empty( $ratings ) && is_array( $ratings ) ) {
                    foreach ( $ratings as $rating_id => $rating_value ) {
                        if ( ! empty( $post_comments_rating ) && array_key_exists( $rating_id, $post_comments_rating ) ) {
                            $rating_count = (int) $post_comments_rating[ $rating_id ]['c'];
                            if ( ! $optional_multirating || (float) $rating_value > 0 ) {
                                $rating_count ++;
                            }
    
                            $_rating_value = (float) $post_comments_rating[$rating_id]['r']  + (float) $rating_value;
                        } else {
                            $rating_count = 0;
                            if ( ! $optional_multirating || (float) $rating_value > 0 ) {
                                $rating_count ++;
                            }
    
                            $_rating_value = (float) $rating_value;
                        }
    
                        $post_comments_rating[ $rating_id ]['c'] = $rating_count;
                        $post_comments_rating[ $rating_id ]['r'] = $_rating_value;
                    }
                }
            }
        }
    
        if ( $wpdb->get_var( "SHOW TABLES LIKE '" . $detail_table . "'" ) == $detail_table ) {
            $wpdb->query( $wpdb->prepare( "UPDATE " . $detail_table . " SET ratings  = %s where post_id = %d", array( maybe_serialize( $post_comments_rating ), $post_id ) ) );
        } else {
            update_post_meta( $post_id, 'ratings ', maybe_serialize( $post_comments_rating ) );
        }
    }

    Let us know.

    Regards,
    Kiran

    in reply to: Not Showing on Homepage AND All Images Are Not Uploading #521299

    Kiran
    Moderator
    Post count: 7069

    Hi Jeff,

    We have seen similar issue recently. It happens when image upload takes longer time then expected.

    If you see issue again then try following PHP snippet.

    
    
    function gd_snippet_191213_autosave( $time ) {
    	$time = 60000; // 10000 = 10 seconds, set to 0 to disable
    
    	return $time;
    }
    add_filter( 'geodir_autosave', 'gd_snippet_191213_autosave', 10, 1 );

    Kiran

    in reply to: Moving posts between CPT #521298

    Kiran
    Moderator
    Post count: 7069

    Hi adminparentland-pt,

    We have fixed issue of importing and linking translated listings to original listing. It will be in next release of GeoDirectory Multilingual plugin.

    – Download and upload development version from https://github.com/AyeCode/geodir-multilingual
    – Follow instructions given here https://wpgeodirectory.com/support/topic/imported-languages-via-csv-are-not-automatically-linked-to-original-language/#post-512633

    Let us know.

    Kiran

    in reply to: Moving posts between CPT #521296

    Kiran
    Moderator
    Post count: 7069

    Hi adminparentland-pt,

    All CPTs has different database table to store data apart from wp_posts table.

    For example:
    – gd_place posts data saved in wp_geodir_gd_place_detail table.
    – gd_event posts data saved in wp_geodir_gd_event_detail table.
    – gd_hotel posts data saved in wp_geodir_gd_hotel_detail table.

    If you want to move all gd_place posts to under gd_hotel then you have also move data from wp_geodir_gd_place_detail to wp_geodir_gd_hotel_detail. Make sure both CPTs has same fields in table.

    Most easy way to move posts from one CPT to another CPT is export/re-import.
    – Export posts from CPT which want to move
    – Edit CSV file
    — Make blank post_id
    — Change post_type
    — Set correct default_category & post_category of the new CPT
    – Re-import

    Regards,
    Kiran


    Kiran
    Moderator
    Post count: 7069

    Hello,

    Try following PHP snippet to search bedrooms “greater than or equal to x”.

    
    
    function gd_snippet_191212_search_output_to_main_select( $html, $field, $post_type ) {
    	$field_name = 'property_bedrooms'; // CHANGE FIELD NAME HERE
    
        if ( ! empty( $html ) && ! empty( $field->htmlvar_name ) && $field->htmlvar_name == $field_name ) {
    		$html = '<div class="gd-search-input-wrapper gd-search-field-cpt gd-search-' . $field_name . '">';
    		$html .= gd_snippet_191212_search_filter_field_html_output( $html, $field, $post_type, $field_name, true );
    		$html .= '</div>';
    	}
    
    	return $html;
    }
    add_filter( 'geodir_search_output_to_main_checkbox', 'gd_snippet_191212_search_output_to_main_select', 20, 3 );
    add_filter( 'geodir_search_output_to_main_select', 'gd_snippet_191212_search_output_to_main_select', 20, 3 );
    add_filter( 'geodir_search_output_to_main_text', 'gd_snippet_191212_search_output_to_main_select', 20, 3 );
    
    function gd_snippet_191212_search_filter_field_html_output_select( $html, $field, $post_type ) {
    	$field_name = 'property_bedrooms'; // CHANGE FIELD NAME HERE
    
        if ( ! empty( $html ) && ! empty( $field->htmlvar_name ) && $field->htmlvar_name == $field_name ) {
    		$html = '<div class="geodir-filter-cat gd-type-single gd-field-' . $field_name . '"><span>' . __( $field->frontend_title, 'geodirectory' ) . '</span><ul><li>';
    		$html .= gd_snippet_191212_search_filter_field_html_output( $html, $field, $post_type, $field_name, false );
    		$html .= '</li></ul></div>';
    	}
    
    	return $html;
    }
    add_filter( 'geodir_search_filter_field_html_output_checkbox', 'gd_snippet_191212_search_filter_field_html_output_select', 20, 3 );
    add_filter( 'geodir_search_filter_field_html_output_select', 'gd_snippet_191212_search_filter_field_html_output_select', 20, 3 );
    add_filter( 'geodir_search_filter_field_html_output_text', 'gd_snippet_191212_search_filter_field_html_output_select', 20, 3 );
    
    function gd_snippet_191212_search_filter_field_html_output( $html, $field, $post_type, $field_name, $main ) {
    	$value = isset( $_REQUEST[ 's' . $field_name ] ) ? sanitize_text_field( $_REQUEST[ 's' . $field_name ] ) : '';
    
    	$html = '<select name="s' . $field_name . '" class="cat_select"><option value="">' . __( 'Bedrooms', 'geodirectory' ) . '</option>';
    	for ( $k = 1; $k <= 10; $k++ ) {
    		$html .= '<option value="' . $k . '" ' . selected( $k, $value, false ) . '>' . $k . '</option>'; // X
    		$html .= '<option value="' . $k . '-More" ' . selected( $k . '-More', $value, false ) . '>' . $k . '+</option>'; // X+
    	}
    	$html .= '</select>';
    
    	return $html;
    }
    
    function gd_snippet_191212_search_filter_searched_params( $params, $post_type ) {
    	$field_name = 'property_bedrooms'; // CHANGE FIELD NAME HERE
    
    	if ( isset( $_REQUEST[ 's' . $field_name ] ) && $_REQUEST[ 's' . $field_name ] !== '' ) {
    		$_params = array();
    
    		if ( ! empty( $params ) ) {
    			foreach ( $params as $key => $param ) {
    				if ( strpos( $param, 'data-name="s' . $field_name . '"' ) !== false ) {
    					$title = '';
    
    					for ( $k = 1; $k <= 10; $k++ ) {
    						if ( $_REQUEST[ 's' . $field_name ] === $k . '-More' ) {
    							$title = wp_sprintf( __( 'Bedrooms: %d', 'geodirectory' ), $k ) . '+';
    						} elseif ( absint( $_REQUEST[ 's' . $field_name ] ) === $k ) {
    							$title = wp_sprintf( __( 'Bedrooms: %d', 'geodirectory' ), $k );
    						} elseif ( absint( $_REQUEST[ 's' . $field_name ] ) === 0 ) {
    							$title = __( 'No Bedroom', 'geodirectory' );
    						}
    					}
    
    					if ( $title ) {
    						$param = '<label class="gd-adv-search-label gd-adv-search-range gd-adv-search-' . $field_name . '" data-name="s' . $field_name . '"><i class="fas fa-times" aria-hidden="true"></i> ' . $title . '</label>';
    					}
    				}
    
    				$_params[ $key ] = $param;
    			}
    		} else {
    			$title = '';
    
    			for ( $k = 1; $k <= 10; $k++ ) {
    				if ( $_REQUEST[ 's' . $field_name ] === $k . '-More' ) {
    					$title = wp_sprintf( __( 'Bedrooms: %d', 'geodirectory' ), $k ) . '+';
    				} elseif ( absint( $_REQUEST[ 's' . $field_name ] ) === $k ) {
    					$title = wp_sprintf( __( 'Bedrooms: %d', 'geodirectory' ), $k );
    				} elseif ( absint( $_REQUEST[ 's' . $field_name ] ) === 0 ) {
    					$title = __( 'No Bedroom', 'geodirectory' );
    				}
    			}
    
    			if ( $title ) {
    				$param = '<label class="gd-adv-search-label gd-adv-search-range gd-adv-search-' . $field_name . '" data-name="s' . $field_name . '"><i class="fas fa-times" aria-hidden="true"></i> ' . $title . '</label>';
    				$_params[] = $param;
    			}
    		}
    
    		$params = $_params;
    	}
    
    	return $params;
    }
    add_filter( 'geodir_search_filter_searched_params', 'gd_snippet_191212_search_filter_searched_params', 20, 3 );
    
    function gd_snippet_191212_search_posts_where( $where, $query = array() ) {
    	global $geodir_post_type;
    
    	$field_name = 'property_bedrooms'; // CHANGE FIELD NAME HERE
    
    	if ( ! empty( $where ) && isset( $_REQUEST[ 's' . $field_name ] ) && $_REQUEST[ 's' . $field_name ] !== '' && GeoDir_Query::is_gd_main_query( $query ) ) {
    		$table = geodir_db_cpt_table( $geodir_post_type );
    
    		for ( $k = 1; $k <= 10; $k++ ) {
    			if ( $_REQUEST[ 's' . $field_name ] === $k . '-More' ) {
    				$where = str_replace( "AND {$table}.{$field_name} LIKE '" . $k . "-More'", "AND {$table}.{$field_name} >= {$k}", $where );
    			}
    		}
    	}
    	return $where;
    }
    add_filter( 'geodir_search_posts_where', 'gd_snippet_191212_search_posts_where', 20, 2 );

    Kiran

    in reply to: schema issue #521100

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
Viewing 15 posts - 901 through 915 (of 6,022 total)
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount