Kiran
Forum Replies Created
-
AuthorPosts
-
This reply has been marked as private.
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,
KiranThis reply has been marked as private.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,
KiranThis reply has been marked as private.This reply has been marked as private.This reply has been marked as private.April 15, 2020 at 8:26 am in reply to: Neighbourhood location not kept being kept when navigating to a single listing #540289Hi 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,
KiranThis reply has been marked as private.This reply has been marked as private.April 15, 2020 at 5:42 am in reply to: Neighbourhood images partially fixed after update [Potential Fix} #540269Hi Nicholas,
We have fixed this issue.
Thanks for spotting.
Kiran
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,
KiranHi Fryderyk,
Please check and let us know.
Kiran
This reply has been marked as private.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]®ion=$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 -
AuthorPosts