Kiran

Forum Replies Created

Viewing 15 posts - 1,861 through 1,875 (of 6,022 total)
  • Author
    Posts
  • in reply to: User Frontend Updates Failing #496273

    Kiran
    Moderator
    Post count: 7069

    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

    in reply to: Ninja Forms Enquiry Button #496269

    Kiran
    Moderator
    Post count: 7069

    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 24

    1) 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,
    Kiran

    in reply to: Custom query to get listings by Category #496265

    Kiran
    Moderator
    Post count: 7069

    Hello 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=85

    Via 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.
    Kiran

    in reply to: After V2 update many problems #496255

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Duplicate post checking #496253

    Kiran
    Moderator
    Post count: 7069

    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

    in reply to: Translation issue #496249

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Fail post to facebook #496242

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: edit / upgrade listing not possible -> page not found #496240

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Percentage ratings #496230

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Fail post to facebook #496225

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Percentage ratings #496219

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Percentage ratings #496205

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Post_images fall back order #496204

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Percentage ratings #496198

    Kiran
    Moderator
    Post count: 7069

    Hello Fulvio,

    Sorry this is not possible at the moment to implement similar percentage ratings instead of GD ratings.

    Kiran

    in reply to: Post_images fall back order #496197

    Kiran
    Moderator
    Post count: 7069

    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

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