Kiran
Forum Replies Created
-
AuthorPosts
-
Hi Adam,
On staging site i have disabled non-GD plugins and activated WordPress default theme. No new listings and edit listings(which are created after issue fixed) are saves data successfully.
I am trying to log queries to find actual problem but debug.log not have any affect. If above FTP credentials are not for staging site then provide FTP for staging site to find actual reason and apply patch on your production site.
Kiran
Hello Katie,
Issue has been fixed.
There are some PHP errors and one of those error breaking Ninja Form.
During debug found following errors in debug.log
1) PHP Fatal error: Uncaught Error: Call to undefined function et_is_ab_testing_active() in /wp-content/themes/Extra/includes/core.php:370 2) PHP Warning: include_once(): Failed opening '/includes/template-tags.php' for inclusion in /wp-content/themes/Extra-playing-in-puddles/functions.php on line 241) was breaking Ninja Form popup, i have fixed it by replacing that line with
'is_ab_testing_active' => function_exists( 'et_is_ab_testing_active' ) && et_is_ab_testing_active(),2) is not affecting Ninja Form popup but you should fix it.
Best Regards,
KiranHello David,
You can retrieve listings by category id via API or via WP Query.
Via API:
http://YOURSITE.COM/wp-json/geodir/v2/places/?gd_placecategory=85Via WP_QUERY:
$post_type = 'gd_place'; // Post type $category_id = array( 85 ); // Category ID $query_args = array( 'post_type' => $post_type, 'post_status' => array( 'publish' ), 'fields' => 'ids', 'posts_per_page' => 20, // -1 for all 'tax_query' => array( array( 'taxonomy' => $post_type . 'category', 'field' => 'term_id', 'terms' => $category_id, 'include_children' => true, ) ) ); $posts_query = new WP_Query(); $posts = $posts_query->query( $query_args ); if ( ! empty( $posts ) ) { foreach ( $posts as $post_ID ) { $gd_post = geodir_get_post_info( $post_ID ); } }Let us know.
KiranThis reply has been marked as private.Hello Eugene,
Currently it checks duplicate for single field not with set of fields combine. It checking duplicate for each field on keyup from field so duplicate checking for combine fields is not possible at the moment. We implements feature on priority base and in past no customers has requested similar feature. We keep your suggestion and will surly implement in future if more customers asks for same feature.
Kiran
This reply has been marked as private.This reply has been marked as private.This reply has been marked as private.This reply has been marked as private.This reply has been marked as private.This reply has been marked as private.This reply has been marked as private.This reply has been marked as private.Hello Fulvio,
Sorry this is not possible at the moment to implement similar percentage ratings instead of GD ratings.
Kiran
Hello,
Try following snippet to display original image in post meta.
function gd_snippet_040719_get_image_tag( $html, $id, $alt, $title, $align, $size ) { global $wpdb; if ( $size == 'medium' && empty( $align ) ) { $image = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM " . GEODIR_ATTACHMENT_TABLE . " WHERE ID = %d AND type != 'post_images'", $id ) ); if ( ! empty( $image ) && ( $image->type == 'image_test' ) ) { $size = 'original'; // LEAVE BLANK TO SHOW ORIGINAL IMAGE. $align = 'center'; $meta = isset( $image->metadata ) ? maybe_unserialize( $image->metadata ) : ''; $img_src = geodir_get_image_src( $image, $size ); $width = isset( $meta['width'] ) ? $meta['width'] : ''; $height = isset( $meta['height'] ) ? $meta['height'] : ''; $hwstring = image_hwstring( $width, $height ); $title = isset( $image->title ) && $image->title ? 'title="' . esc_attr( wp_strip_all_tags( $image->title ) ) . '" ' : ''; $alt = isset( $image->caption ) && $image->caption ? esc_attr( wp_strip_all_tags( $image->caption ) ) : 'image-' . $id; $class = 'align' . esc_attr( $align ) .' size-' . esc_attr( $size ) . ' geodir-image-' . $id; $html = '<img src="' . esc_attr( $img_src ) . '" alt="' . esc_attr( $alt ) . '" ' . $title . $hwstring . 'class="' . $class . '" />'; } } return $html; } add_filter( 'geodir_get_image_tag', 'gd_snippet_040719_get_image_tag', 20, 6 );Kiran
-
AuthorPosts