Kiran
Forum Replies Created
-
AuthorPosts
-
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
May 18, 2018 at 6:55 am in reply to: Custom Field Dropdown in Main Search Bar not displaying expected results #431078Hello,
Please check now, there was conflict with search query. I have fixed it and now it is working fine.
Kiran
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
Great, glad to hear that! 🙂
Hello,
Please follow this: https://wpgeodirectory.com/support/topic/error-with-new-wp-version/#post-403930
Kiran
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
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,
KiranHi Rich,
Please check this https://wpgeodirectory.com/docs/geodirectory-does-not-have-access-to-your-filesystem/
Kiran
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
This reply has been marked as private.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,
KiranBut 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
I have fixed this and it will be in next release.
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
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 -
AuthorPosts