Kiran

Forum Replies Created

Viewing 15 posts - 1,741 through 1,755 (of 6,022 total)
  • Author
    Posts
  • in reply to: unable to review posts or events #499318

    Kiran
    Moderator
    Post count: 7069

    Hello Andreas,

    Use following PHP snippet to prevent Antispam Bee conflict with GeoDirectory.

    
    
    /**
     * Fix Antispam Bee conflict with GeoDirectory submit review.
     */
    function gd_snippet_190724_template_redirect() {
    	global $gd_post;
    
    	if ( class_exists( 'Antispam_Bee' ) && has_action( 'template_redirect', array( 'Antispam_Bee', 'prepare_comment_field' ) ) && ! empty( $gd_post ) && geodir_is_page( 'detail' ) ) {
    		remove_action( 'template_redirect', array( 'Antispam_Bee', 'prepare_comment_field' ) );
    	}
    }
    add_action( 'template_redirect', 'gd_snippet_190724_template_redirect', 0 );

    Regards,
    Kiran

    in reply to: How do I get results by meta field value? #499311

    Kiran
    Moderator
    Post count: 7069

    Hello Aleks,

    API route you mentioned is correct to search for Beginner. But i checked and it looks like WordPress has something changed in API that affected the GD API searching.

    We have opened task to check and fix this issue.

    Kiran


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

    Kiran
    Moderator
    Post count: 7069

    Hi Mark,

    Please check and let us know.

    Regards,
    Kiran

    in reply to: Start and end date (expire date) on invoice #499132

    Kiran
    Moderator
    Post count: 7069

    It is normal behavior. Invoice is a bridge between a listing and a package. So it is generating free invoice for free franchise.

    Kiran.

    in reply to: Which URL format of languages to choose? #499120

    Kiran
    Moderator
    Post count: 7069

    Hello.

    We recommend 1) option ex: http://www.site.com/LANG/.

    Do I need to use the default language directory?

    You can leave directory use for default language.

    Is there a description of the help for this function?

    You can find documentation at WPML site. https://wpml.org/documentation/getting-started-guide/language-setup/#language-url-format

    Kiran

    in reply to: Change to Review/comment Header #499119

    Kiran
    Moderator
    Post count: 7069

    Hello,

    To add text ‘This review was written on’ before date, just replace

    $(this).text($title);

    to

    $(this).text('This review was written on ' + $title);

    Kiran

    in reply to: Sorting Options #499116

    Kiran
    Moderator
    Post count: 7069

    Hello Fulvio,

    Try following PHP snippet.

    
    
    function gd_snippet_20190723_after_review_list_title() {
    	global $gd_post;
    
    	if ( $gd_post->overall_rating > 0 ) {
    		$overall_rating = geodir_format_decimal( (float) $gd_post->overall_rating, 1 );
    
    		echo '<div class="_gd-overall-rating" style="display:inline-block;margin-left:5px">' . $overall_rating . '</div>';
    	}
    }
    add_action( 'geodir_after_review_list_title', 'gd_snippet_20190723_after_review_list_title', 0 );

    Kiran


    Kiran
    Moderator
    Post count: 7069

    Hello Foster,

    I checked and found you have done some customization via theme. Please provide FTP credentials to look into more.

    Kiran

    in reply to: Map Styling not applying consistently #499090

    Kiran
    Moderator
    Post count: 7069

    Hello There,

    From next versions of GeoDirectory Core & Map Styles plugins there is inbuilt settings to customize add listing page map.

    Kiran

    in reply to: Start and end date (expire date) on invoice #499022

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Google Maps error with adress field #498917

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

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: I updated to V2 – Site is down #498905

    Kiran
    Moderator
    Post count: 7069

    Hi Matt,

    Please check now and let us know.

    Kiran

    in reply to: Start and end date (expire date) on invoice #498886

    Kiran
    Moderator
    Post count: 7069

    Hello,

    Try this

    
    
    /**
     * Show post expire date.
     */
    function gd_snippet_190719_invoice_print_after_line_items( $invoice ) {
        global $wpdb;
    
    	if ( empty( $invoice ) ) {
            return NULL;
        }
    
    	$row = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM " . GEODIR_PRICING_POST_PACKAGES_TABLE . " WHERE invoice_id = %d AND status = 'publish' ORDER BY id DESC LIMIT 1", array( (int) $invoice->ID ) ) );
        if ( ! empty( $row ) && ! $invoice->is_free() &&  geodir_is_gd_post_type( get_post_type( $row->post_id ) ) ) {
    		$date_format = geodir_date_format();
    		
    		$start_date = date_i18n( $date_format, strtotime( $row->date ) );
    		$expire_date = geodir_get_post_meta( $row->post_id, 'expire_date', true );
    
    		if ( geodir_strtolower( $expire_date ) == 'never' || $expire_date == '0000-00-00' ) {
    			$expire_date = __( 'Never' );
    		} else {
    			$expire_date = date_i18n( $date_format, strtotime( $expire_date ) );
    		}
    
    		$dates = '<span class="-gd-inv-start-date">' . __( 'Start Date:' ) . ' ' . $start_date . '<br></span>';
    		$dates .= '<span class="-gd-inv-expire-date">' . __( 'Expire Date:' ) . ' ' . $expire_date . '</span>';
    		?>
    		<div class="row wpinv-geodir-event-date">
    			<div class="col-sm-12">
    				<?php echo $dates; ?>
    			</div>
    		</div>
    		<?php 
        }
    }
    add_action( 'wpinv_invoice_print_after_line_items', 'gd_snippet_190719_invoice_print_after_line_items', 10, 1 );

    Kiran

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