Kiran

Forum Replies Created

Viewing 15 posts - 4,036 through 4,050 (of 6,022 total)
  • Author
    Posts
  • in reply to: Redirect Expired Events #431079

    Kiran
    Moderator
    Post count: 7069

    Hi Dale,

    Use following code to find listing is expired or not. Replace “$check_is_expired = false; // DO STUFF HERE TO CHECK HERE EXPIRED OR NOT” in previous code.

    
    
    $post_expire_date = geodir_get_post_meta( $post[0]->ID, 'expire_date', true );
    $check_is_expired = ( $post_expire_date != '0000-00-00' && $post_expire_date != '' && geodir_strtolower( $post_expire_date ) != 'never' && strtotime( $post_expire_date ) < strtotime( date_i18n( 'Y-m-d', current_time( 'timestamp' ) ) ) );

    This is customization and it is beyond support, so we can help you more in code customization. You can hire developer from http://geodirectoryexperts.com/

    Kiran


    Kiran
    Moderator
    Post count: 7069

    Hello,

    Please check now, there was conflict with search query. I have fixed it and now it is working fine.

    Kiran

    in reply to: Redirect Expired Events #430972

    Kiran
    Moderator
    Post count: 7069

    I just given code with basic logic that you can follow. you have to write code to check event expire or not at “// DO STUFF HERE TO CHECK HERE EXPIRED OR NOT”.

    Event can be expired via package or via event date. which one you following?

    Kiran

    in reply to: Disable Geodirectory js minification #430917

    Kiran
    Moderator
    Post count: 7069

    Great, glad to hear that! 🙂

    in reply to: php notice: geodir_location_functions.php #430847

    Kiran
    Moderator
    Post count: 7069
    in reply to: Redirect Expired Events #430844

    Kiran
    Moderator
    Post count: 7069

    Hi,

    Try this one:

    
    
    function expired_events_redirect_setup( $post, $query ) {
        global $wp, $gd_expired, $wp_query;
        
        if ( !empty( $post ) && !empty( $query->is_single ) && $post[0]->post_type == 'gd_event' ) {        
    
    		$check_is_expired = false; // DO STUFF HERE TO CHECK HERE EXPIRED OR NOT
            
            if ( $check_is_expired )  {
                $gd_expired = $post[0]->ID;
                $wp_query->is_single = true;
            }
        }
        
        return $post;
    }
    add_filter( 'posts_results', 'expired_events_redirect_setup', 10, 2 );
    
    function expired_events_redirect() {
        global $wp, $post, $wp_query, $gd_expired;
       
        if ( is_404() && $gd_expired ) {
            $gd_post = get_post( $gd_expired );
            
            if ( !( !empty( $gd_post ) && $gd_post->post_type == 'gd_event' ) ) {
                return;
            }
    
    		$default_category_id = geodir_get_post_meta( $gd_post->ID, 'default_category', true );
            $term = $default_category_id ? get_term( $default_category_id, $gd_post->post_type . 'category' ) : '';
            $default_category = !empty( $term ) && !is_wp_error( $term ) ? $term->slug : '';
    
    		if ( $default_category ) {
    			$redirect_url = get_term_link( $default_category );
    		} else {
    			$redirect_url = home_url();
    		}
    
    		wp_redirect( $redirect_url );
            exit();
        }
    }
    add_filter( 'template_redirect', 'expired_events_redirect' );

    Kiran

    in reply to: GeoDirectory does not have access to your filesystem #430838

    Kiran
    Moderator
    Post count: 7069

    Hi Rich,

    You have used incorrect single quote.

    Incorrect:

    
    
    define( ‘FTP_USER’, ‘xxxxxxx’ );
    define( ‘FTP_PASS’, ‘xxxxxxx’ );

    Correct

    
    
    define( 'FTP_USER', 'xxxxxxx' );
    define( 'FTP_PASS', 'xxxxxxx' );

    I have corrected it and now warning message disappeared.

    Thanks,
    Kiran

    in reply to: GeoDirectory does not have access to your filesystem #430798

    Kiran
    Moderator
    Post count: 7069
    in reply to: Event tags issue #430796

    Kiran
    Moderator
    Post count: 7069

    This is normal WordPRess behaviour if you add “@Sponsored Home page” & “Sponsored Home page” then it will show both tags on frontend.

    I am not sure why you adding “@” to that tag.

    Kiran

    in reply to: Fixing Left Column in Extra theme from Elegant Themes #430784

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: GD Listings by ID #430777

    Kiran
    Moderator
    Post count: 7069

    Hi Dirk,

    You can use this hook to filter listing data being submitted. https://github.com/GeoDirectory/geodirectory/blob/d1298ab275a7e54b36bb1cd33abacda42df66df2/geodirectory-functions/post_functions.php#L173

    You can filter tags (add/remove) from this data.

    Thanks,
    Kiran

    in reply to: Event tags issue #430767

    Kiran
    Moderator
    Post count: 7069

    But on the frontend we can see two tags with the similar name.

    Those tags have not similar name. One tag has “@” which makes it different from other one.

    Try to remove tag ( “@Sponsored Home page” or “Sponsored Home page” not required one ) from backend edit event page and save.

    Let us know what you see.

    Kiran

    in reply to: None Of The Add-Ons Work #430765

    Kiran
    Moderator
    Post count: 7069

    I have fixed this and it will be in next release.

    in reply to: GD Listings by ID #430760

    Kiran
    Moderator
    Post count: 7069

    Try this one

    
    
    	  $tag = $value;
    	  geodir_save_post_meta( $value, 'post_tags', array( $tag ) );
    	  wp_set_object_terms( $value, array( $tag ), get_post_type( $value ) . '_tags' );
    	  echo do_shortcode('[gd_listings post_type=gd_cv layout=1 tags=' . $tag . ']');

    Kiran

    in reply to: No Listings Shows Wrong City #430671

    Kiran
    Moderator
    Post count: 7069

    Hi Jeff,

    Currently there is no any option to clear location except searching for new location. We have added it in our todo to implement in next release.

    Thanks,
    Kiran

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