Kiran

Forum Replies Created

Viewing 15 posts - 121 through 135 (of 6,022 total)
  • Author
    Posts
  • in reply to: Sitemap errors #540654

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Claim listing form "currently under revision" #540626

    Kiran
    Moderator
    Post count: 7069

    Hi Birgit,

    Something conflict that prevents adding a shortcode selection button to the editor. It is hard to find which plugin or them causing these conflict.

    Do you have staging site where i can disable non GD plugins one by one to find which causing this issue?

    Regards,
    Kiran

    in reply to: Position an event on entire region #540597

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Custom Sidebar won't show on GD pages #540594

    Kiran
    Moderator
    Post count: 7069

    Hi Mazin,

    I checked and found that dynamic sidebars created via “K Fonts” plugin are not registering properly. This causing issue in rendering that dynamic sidebar on front-end side.

    Please contact the Kleo support team about this issue. Let us know what they reply.

    Regards,
    Kiran

    in reply to: Listimia theme and locations help #540368

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Validation Message don not shown #540316

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Listimia theme and locations help #540307

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

    Kiran
    Moderator
    Post count: 7069

    Hi Nicholas,

    Listing detail page url has location depth upto city. It does not have neighborhood in listing detail page url. Whenever GD page url visited it sets current location from url. Detail page has url /country/region/city so it sets current location to city.

    This is normal behavior and not a bug.

    Let us know if this is not the thing you talking about.

    Regards,
    Kiran

    in reply to: Sitemap errors #540282

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Average not available #540276

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

    Kiran
    Moderator
    Post count: 7069

    Hi Nicholas,

    We have fixed this issue.

    Thanks for spotting.

    Kiran

    in reply to: Problem with GD > Listings element #540096

    Kiran
    Moderator
    Post count: 7069

    Hi Fryderyk,

    There is a conflict issue with page/block builder & GD widgets. It not changes categories on change of pot type. This is working fine in normal widgets. We are working on this issue.

    Thanks,
    Kiran

    in reply to: Problem with GD > Listings element #539982

    Kiran
    Moderator
    Post count: 7069

    Hi Fryderyk,

    Please check and let us know.

    Kiran

    in reply to: Validation Message don not shown #539813

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Position an event on entire region #539809

    Kiran
    Moderator
    Post count: 7069

    Hello Alain,

    Try following PHP snippet to set ‘/%country%/%region%/%postname%/’ permalink to specific events.

    
    
    function gd_snippet_200413_event_ids() {
    	$event_ids = array( 196, 210 ); // CHANGE EVENT IDS HERE
    
    	return $event_ids;
    }
    
    function gd_snippet_200413_event_rewrite_rules( $rules ) {
    	global $geodirectory;
    
    	$event_ids = gd_snippet_200413_event_ids();
    	$event_slug = 'events'; // Event slug
    
    	$_rules = array();
    
    	foreach ( $rules as $regex => $query ) {
    		if ( strpos( $query, '&gd_event=' ) !== 0 && strpos( $query, 'country=' ) !== 0 && strpos( $query, 'region=' ) !== 0 ) {
    			foreach ( $event_ids as $event_id ) {
    				$gd_post = geodir_get_post_info( $event_id );
    				$post_permalinks = gd_snippet_200413_post_location_slugs( $gd_post );
    
    				if ( ! empty( $gd_post ) && ! empty( $post_permalinks ) ) {
    					$_regex = '^' . $event_slug . '/([^/]*)/([^/]*)/' . $gd_post->post_name . '/?';
    					$_query = 'index.php?country=$matches[1]&region=$matches[2]';
    					if ( ! empty( $post_permalinks->city_slug ) ) {
    						$_query .= '&city=' . $post_permalinks->city_slug;
    					}
    					$_query .= '&gd_event=' . $gd_post->post_name;
    
    					$_rules[ $_regex ] = $_query;
    				}
    			}
    		}
    
    		$_rules[ $regex ] = $query;
    	}
    	$rules = $_rules;
    
    	return $rules;
    }
    add_filter( 'rewrite_rules_array', 'gd_snippet_200413_event_rewrite_rules', 9999, 1 );
    
    function gd_snippet_200413_post_location_slugs( $gd_post ) {
    	global $geodirectory;
    
    	return apply_filters( 'geodir_post_permalinks', $geodirectory->location->get_post_location( $gd_post ), $gd_post );
    }
    
    function gd_snippet_200413_event_post_link( $post_link, $post_obj, $leavename, $sample ) {
    	global $wpdb, $wp_query, $post, $gd_post, $comment_post_cache, $gd_permalink_cache;
    
    	$event_ids = gd_snippet_200413_event_ids();
    	$the_post = $gd_post;
    
    	// Only modify if its a GD post type.
    	if ( ! empty( $post_obj ) && ! empty( $post_obj->ID ) && in_array( $post_obj->ID, $event_ids ) ) {
    		$permalink_structure = '/%country%/%region%/%postname%/';
    		$gd_post = geodir_get_post_info( $post_obj->ID );
    
    		if ( empty( $gd_post ) || strpos( $permalink_structure, '%postname%' ) === false ) {
    			$gd_post = $the_post;
    			return $post_link;
    		}
    
    		if ( function_exists( 'geodir_location_geo_home_link' ) ) {
    			remove_filter( 'home_url', 'geodir_location_geo_home_link', 100000 );
    		}
    
    		$permalink = trailingslashit( home_url() );
    
    		if ( function_exists( 'geodir_location_geo_home_link' ) ) {
    			add_filter( 'home_url', 'geodir_location_geo_home_link', 100000, 2 );
    		}
    
    		$post_types = geodir_get_posttypes( 'array' );
    		$cpt_slug = $post_types[ $gd_post->post_type ]['rewrite']['slug'];
    		$cpt_slug = apply_filters( 'geodir_post_permalink_structure_cpt_slug', $cpt_slug, $gd_post, $post_link );
    
    		$permalink .= $cpt_slug . $permalink_structure;
    
    		if ( strpos( $permalink, '%country%' ) !== false ) {
    			$locations = gd_snippet_200413_post_location_slugs( $gd_post );
    
    			if ( isset( $locations->country_slug ) && $locations->country_slug ) {
    				$permalink = str_replace( '%country%', $locations->country_slug, $permalink );
    			}
    		}
    
    		if ( strpos( $permalink, '%region%' ) !== false ) {
    			$locations = isset( $locations ) ? $locations : gd_snippet_200413_post_location_slugs( $gd_post );
    
    			if ( isset( $locations->region_slug ) && $locations->region_slug ) {
    				$permalink = str_replace( '%region%', $locations->region_slug, $permalink );
    			}
    		}
    
    		if ( ! $leavename && strpos( $permalink, '%postname%' ) !== false ) {
    			$permalink = str_replace( '%postname%', $gd_post->post_name, $permalink );
    		}
    
    		$post_link = $permalink;
    
    		if ( ! $sample && ( ! isset( $_REQUEST['geodir_ajax'] ) || ( isset( $_REQUEST['geodir_ajax'] ) && $_REQUEST['geodir_ajax'] != 'add_listing' ) ) ) {
    			$gd_permalink_cache[ $gd_post->ID ] = $post_link;
    		}
    	}
    
    	$gd_post = $the_post;
    
    	return $post_link;
    }
    add_filter( 'post_type_link', 'gd_snippet_200413_event_post_link', 1, 4 );

    – Set your event ids in 2nd line.
    – After adding snippet, don’t forget to re-save permalinks from Settings > Permalinks.

    Regards,
    Kiran

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