Kiran
Forum Replies Created
-
AuthorPosts
-
This reply has been marked as private.
Hi Andrea,
Use following code snippet to customize event sorting by adding start date/end date sorting. Put this code in your theme functions.php or via any snippet plugin.
function _gd_custom_event_sort_fields_start_end_date( $sort_fields, $post_type ) { if ( $post_type == 'gd_event' && is_main_query() && ( geodir_is_page( 'listing' ) || geodir_is_page( 'search' ) ) ) { // Start Date $sort_fields[] = (object)array( 'id' => 0, 'post_type' => 'gd_event', 'data_type' => '', 'field_type' => 'datetime', 'site_title' => __( 'Start Date', 'your_textdomain' ), 'htmlvar_name' => 'start_date', 'sort_order' => '0', 'is_active' => '1', 'is_default' => '1', // Default sorting field 'default_order' => 'start_date_asc', // Default sort order start_date_asc or start_date_desc 'sort_asc' => '1', 'sort_desc' => '1', 'asc_title' => __( 'Start Date ASC', 'your_textdomain' ), 'desc_title' => __( 'Start Date DESC', 'your_textdomain' ), ); // End Date $sort_fields[] = (object)array( 'id' => 0, 'post_type' => 'gd_event', 'data_type' => '', 'field_type' => 'datetime', 'site_title' => __( 'End Date', 'your_textdomain' ), 'htmlvar_name' => 'end_date', 'sort_order' => '0', 'is_active' => '1', 'is_default' => '0', 'default_order' => '', 'sort_asc' => '1', 'sort_desc' => '1', 'asc_title' => __( 'End Date ASC', 'your_textdomain' ), 'desc_title' => __( 'End Date DESC', 'your_textdomain' ), ); } return $sort_fields; } add_filter( 'geodir_get_sort_options', '_gd_custom_event_sort_fields_start_end_date', 10, 2 ); function _gd_custom_event_sort_by_start_end_date( $orderby, $sort_by, $table ) { global $plugin_prefix; if ( $table == $plugin_prefix . 'gd_event_detail' && is_main_query() && ( geodir_is_page( 'listing' ) || geodir_is_page( 'search' ) ) ) { $sorting = ''; if ( empty( $sort_by ) ) { $sort_by = 'start_date_asc'; // Default sort } if ( $sort_by == 'start_date_asc' || $sort_by == 'end_date_asc' ) { if ( $sort_by == 'end_date_asc' ) { $sorting .= " " . EVENT_SCHEDULE . ".event_enddate ASC, " . EVENT_SCHEDULE . ".event_endtime ASC, "; } $sorting .= " " . EVENT_SCHEDULE . ".event_date ASC, " . EVENT_SCHEDULE . ".event_starttime ASC, "; } else if ( $sort_by == 'start_date_desc' || $sort_by == 'end_date_desc' ) { if ( $sort_by == 'end_date_desc' ) { $sorting .= " " . EVENT_SCHEDULE . ".event_enddate DESC, " . EVENT_SCHEDULE . ".event_endtime DESC, "; } $sorting .= " " . EVENT_SCHEDULE . ".event_date DESC, " . EVENT_SCHEDULE . ".event_starttime DESC, "; } if ( !empty( $sorting ) ) { $replace_asc = " " . EVENT_SCHEDULE . ".event_date asc, " . EVENT_SCHEDULE . ".event_starttime asc , "; $replace_desc = " " . EVENT_SCHEDULE . ".event_date desc, " . EVENT_SCHEDULE . ".event_starttime desc , "; $orderby = str_replace( array( $replace_asc, $replace_desc ), '', $orderby ); $orderby .= $sorting; } } return $orderby; } add_filter( 'geodir_posts_order_by_sort', '_gd_custom_event_sort_by_start_end_date', 10, 3 );
Thanks,
KiranThere was problem in GeoDirectory plugin that you visit login page with logged in it redirects the author page without adding username in url.
I have fixed this and updated on your site and it will be updated in next releases too.Thanks,
KiranIn WP File Manager some files are not editable (Ex: wp-config.php). So FTP credentials will be much better.
Kiran
Please check. K Elements plugin was disabled.
I enabled it and now it working fine.Kiran
Hi Steve,
I looked in your backend Multilocations settings and found settings are incorrect. You have enabled “Selected Countries” for Country, “Enable Multi Regions” for Region but enabled “Default City” for City option. This does not make sense. That’s why all listings goes to 404 not found.
If default city enabled then the listings which falls outside of default city results in 404 page.
I have enabled “Enable Multi Cities” for City and not listings works fine.Please check and let us know.
Thanks,
KiranSeptember 8, 2017 at 8:42 am in reply to: 404s on 'www.mywebsite.com/CPT/country/city/category ' pages #394752Thanks for letting us know 🙂
If you provide FTP credentials then i can update patch from my side.
Kiran
This reply has been marked as private.This reply has been marked as private.Hi Irene,
Thanks for letting us know.
Just let us know if you have problem with links.Kiran
Hi Sébastien,
I tried to update WPML and it not showing me any such message.
In recent version of Geodirectory we have some fix related to WPML translation. That’s why i am asking to update plugins. If plugin is up to date on site then at least we able to decide that this problem is site specific or not.
I lost a lot of little custom changes. I would like to wait until I can setup a test server once the website is up and running.
Which custom changes you lost after plugin update? Plugin update only replaces the core plugin files.
Let us know which specific email you have translation problem?
Thanks,
KiranPlease check and let us know that it is working or not.
Kiran
Thanks Pete for providing details. We need FTP credentials as well to do some debugging.
Hi Sébastien,
Make sure you have translated those email notifications correctly. Update GeoDirectory & GeoDirectory addons if using old versions.
Let us provide Admin & FTP credentials to look into.
Kiran
Try after clearing your browser cache. If still not working then provide me screenshot what you seen when clicking on CA, because it working fine for me.
-
AuthorPosts