Kiran

Forum Replies Created

Viewing 15 posts - 976 through 990 (of 6,022 total)
  • Author
    Posts
  • in reply to: I need to add fields to my CPT #519199

    Kiran
    Moderator
    Post count: 7069

    Thanks for letting us know.

    Kiran

    in reply to: Can´t see sales #519197

    Kiran
    Moderator
    Post count: 7069

    Hi Tania,

    I have done some debugging and found that one of setting “Pretty Affiliate URLs” from AffiliateWP conflicts with GeoDirectory custom post types permalinks.

    Please try un-ticking opion Affiliates > Settings > General > Pretty Affiliate URLs.

    Let us know how it goes.

    Regards,
    Kiran

    in reply to: GD Search page and DIVI builder won't play nice together #519179

    Kiran
    Moderator
    Post count: 7069

    Hi Manfred,

    GD search page issue with Divi Builder has been fixed.

    Please check and let us know.

    Regards,
    Kiran

    in reply to: Search not rendering in BB themer #519164

    Kiran
    Moderator
    Post count: 7069

    Hi Kathy,

    Above instructions only applicable if you want to use GD Search with Beaver Themer Layout. It will only affect the GD Search page.

    We have implemented this in recent version to prevent overwrite Beaver Themer Layout between GD Search & WordPress Search.

    Let us know.

    Regards,
    Kiran

    in reply to: I need to add fields to my CPT #519162

    Kiran
    Moderator
    Post count: 7069

    Hi Jose,

    I have run GD tool “Clear Version” from GeoDirectory > Status > Tools and added one field in all CPTs in both custom fields & search section. It worked fine for me without issue.

    Please check and let us know.

    Regards,
    Kiran

    in reply to: Icons #519003

    Kiran
    Moderator
    Post count: 7069

    Thanks for letting us know.

    Kiran


    Kiran
    Moderator
    Post count: 7069

    Hi Richard,

    The title issue has been fixed. Please check and let us know.

    Best Regards,
    Kiran

    in reply to: Icons #519000

    Kiran
    Moderator
    Post count: 7069

    Hi dominiccadle,

    Page is using old Font Awesome and we are using recent Font Awesome. this causes conflicts on pages for some icons.

    I have updated Font Awesome from Settings > Font Awesome to prevent this conflicts.

    Please check and let us know.

    Regards,
    Kiran

    in reply to: Rating numbers not being received via API. #518876

    Kiran
    Moderator
    Post count: 7069

    Hi Rodney,

    This has been fixed and it will be in next release of GeoDirectory & Review Rating Manager plugin.

    Provide us FTP credentials if you want me to apply patch on your site.

    Regards,
    Kiran

    in reply to: No search input creates different results page #518820

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: No search input creates different results page #518749

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: No search input creates different results page #518739

    Kiran
    Moderator
    Post count: 7069

    Hi Adrian,

    This is caused by the one of option from WP Accessibility plugin that forces to use search.php template for empty search.

    I have unticked that option from “Settings > WP Accessibility > Miscellaneous Accessibility Settings > Force search error on empty search submission (theme must have search.php template)”.

    Please check and let us know.

    Regards,
    Kiran

    in reply to: Search for translated country name does not work #518736

    Kiran
    Moderator
    Post count: 7069

    Hi Irmgard,

    Try following PHP snippet to show region dropdown in search form.

    
    
    /**
     * Show region dropdown in search.
     */
    function gd_snippet_191126_region_dropdown_search() {
    	if ( defined( 'GEODIRLOCATION_VERSION' ) ) {
    		remove_action( 'geodir_search_hidden_fields', 'geodir_as_add_search_location', 10 );
    		add_action( 'geodir_search_form_inputs', 'gd_snippet_191126_search_form_inputs', 30 );
    		add_action( 'geodir_search_hidden_fields', 'gd_snippet_191126_search_hidden_fields', 30 );
    	}
    }
    add_action( 'init', 'gd_snippet_191126_region_dropdown_search' );
    
    function gd_snippet_191126_search_form_inputs() {
    	global $wpdb, $geodir_search_post_type;
    
    	if ( $geodir_search_post_type && ! GeoDir_Post_types::supports( $geodir_search_post_type, 'location' ) ) {
    		return;
    	}
    
    	if ( isset( $_REQUEST['region'] ) && $_REQUEST['region'] != '' ) {
    		$region = sanitize_text_field( $_REQUEST['region'] );
    	} else {
    		$region = '';
    	}
    
    	$results = $wpdb->get_results( "SELECT region, region_slug, country FROM " . GEODIR_LOCATIONS_TABLE . " GROUP BY region_slug ORDER BY region ASC" );
    
    	$input = '<div class="gd-search-input-wrapper gd-search-field-region">';
    	$input .= '<select name="region" class="search_by_region">';
    	$input .= '<option value="">' . __( 'In Region', 'geodirectory' ) . '</option>';
    	if ( ! empty( $results  ) ) {
    		foreach ( $results as $row ) {
    			$title = $row->region;
    			$title .= ', ' . __( $row->country, 'geodirectory' ); // Comment to hide country name from option label.
    
    			$selected = $region == sanitize_text_field( $row->region_slug ) ? 'selected="selected"' : '';
    			$input .= '<option value="' . $row->region_slug . '" ' . $selected . '>' . $title . '</option>';
    		}
    	}
    	$input .= '</select>';
    	$input .= '</div>';
    
    	echo $input;
    }
    
    function gd_snippet_191126_search_hidden_fields() {
        global $wpdb, $geodirectory;
    
        $gd_country = get_query_var( 'country' );
        $gd_region = get_query_var( 'region' );
        $gd_city = get_query_var( 'city' );
        $gd_neighbourhood = get_query_var( 'neighbourhood' );
        $gd_near_me = isset( $geodirectory->location->type ) && $geodirectory->location->type == 'me' ? true : false;
        $gd_near_gps = isset( $geodirectory->location->type ) && $geodirectory->location->type == 'gps' ? true : false;
        $type = '';
        $slug = '';
    
        if ( $gd_country || $gd_region || $gd_city || $gd_neighbourhood || $gd_near_me || $gd_near_gps ) {
            if ( $gd_neighbourhood ) {
                $type = 'neighbourhood';
                $slug = $gd_neighbourhood;
            } elseif ( $gd_city ) {
                $type = 'city';
                $slug = $gd_city;
            } elseif ( $gd_region ) {
                $type = '';
                $slug = '';
            } elseif ( $gd_country ) {
                $type = 'country';
                $slug = $gd_country;
            } elseif ( $gd_near_me ) {
                $type = 'near';
                $slug = 'me';
            } elseif ( $gd_near_gps ) {
                $type = 'near';
                $slug = 'gps';
            } else {
                return;
            }
        }
    
        echo '<input class="geodir-location-search-type" name="' . $type . '" type="hidden" value="' . esc_attr( $slug ) . '">';
    }

    Regards,
    Kiran

    in reply to: Import Issues #518732

    Kiran
    Moderator
    Post count: 7069

    Hi Anitra,

    Please check now. Here is PHP snippet to move attachments from one CPT to another CPT.

    
    
    /**
     * Move attachments after moving listings from one CPT to another CPT.
     *
     * 1) Add this PHP snippet in child theme functions.php file or add via snippet plugin.
     * 2) Go to https://www.YORSITE.COM/?___gdmerge=1
     * 3) Click on GO
     */
    function gd_snippet_191126_move_cpt_attachments() {
    	global $wpdb;
    
    	if ( empty( $_GET['___gdmerge'] ) ) {
    		return;
    	}
    
    	$old_post_type = 'gd_place';  // Old post type.
    	$new_post_type = 'gd_restaurant';  // New post type.
    
    	$results = $wpdb->get_results( "SELECT old.post_id AS old_post_id, new.post_id AS new_post_id, new.post_title FROM {$wpdb->prefix}geodir_{$new_post_type}_detail AS new INNER JOIN {$wpdb->prefix}geodir_{$old_post_type}_detail AS old ON ( old.post_title = new.post_title AND old.post_status = new.post_status AND old.street = new.street ) ORDER BY old.post_id ASC" );
    
    	if ( ! empty( $results ) ) {
    		echo count( $results ) . ' POSTS FOUND</br></br>';
    
    		if ( (int) $_GET['___gdmerge'] === 2 ) {
    			$count = 0;
    			foreach ( $results as $row ) {
    				$result = $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->prefix}geodir_attachments SET post_id = %d WHERE post_id = %d", array( $row->new_post_id, $row->old_post_id ) ) );
    
    				if ( $result ) {
    					$count++;
    					echo $count . ' ) ' . $row->old_post_id . ' => ' . $row->new_post_id . ' ( ' . $row->post_title . ' )</br>';
    				}
    			}
    			echo $count . ' POSTS PROCESSED</br></br>';
    		} else {
    			echo '<a href="' . esc_url( add_query_arg( '___gdmerge', 2, remove_query_arg( '___gdmerge' ) ) ) . '">GO</a>';
    		}
    	} else {
    		echo 'NO POSTS FOUND</br></br>';
    	}
    
    	exit;
    }
    add_action( 'init', 'gd_snippet_191126_move_cpt_attachments', 20 );

    Regards,
    Kiran

    in reply to: schema issue #518723

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