Kiran

Forum Replies Created

Viewing 15 posts - 4,816 through 4,830 (of 6,022 total)
  • Author
    Posts
  • in reply to: Loss of listing fields when selecting package #395041

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Sorting Events By Start – End Date #395029

    Kiran
    Moderator
    Post count: 7069

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

    in reply to: Log In Issues #394773

    Kiran
    Moderator
    Post count: 7069

    There 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,
    Kiran

    in reply to: Uploading large database of listings #394760

    Kiran
    Moderator
    Post count: 7069

    In WP File Manager some files are not editable (Ex: wp-config.php). So FTP credentials will be much better.

    Kiran

    in reply to: Log In Issues #394758

    Kiran
    Moderator
    Post count: 7069

    Please check. K Elements plugin was disabled.
    I enabled it and now it working fine.

    Kiran

    in reply to: Page 404 not found errors #394757

    Kiran
    Moderator
    Post count: 7069

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

    in reply to: 404s on 'www.mywebsite.com/CPT/country/city/category ' pages #394752

    Kiran
    Moderator
    Post count: 7069

    Thanks for letting us know 🙂

    If you provide FTP credentials then i can update patch from my side.

    Kiran

    in reply to: Issue With Date Field #394729

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Shrink Header In Mobile View #394728

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Detail Page Error 404 #394723

    Kiran
    Moderator
    Post count: 7069

    Hi Irene,

    Thanks for letting us know.
    Just let us know if you have problem with links.

    Kiran

    in reply to: Approve Claim > Email translation #394618

    Kiran
    Moderator
    Post count: 7069

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

    in reply to: Log In Issues #394614

    Kiran
    Moderator
    Post count: 7069

    Please check and let us know that it is working or not.

    Kiran

    in reply to: Uploading large database of listings #394608

    Kiran
    Moderator
    Post count: 7069

    Thanks Pete for providing details. We need FTP credentials as well to do some debugging.

    in reply to: Approve Claim > Email translation #394592

    Kiran
    Moderator
    Post count: 7069

    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

    in reply to: map can't stop loading due to large data #394584

    Kiran
    Moderator
    Post count: 7069

    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.

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