Kiran

Forum Replies Created

Viewing 15 posts - 1,621 through 1,635 (of 6,022 total)
  • Author
    Posts
  • in reply to: WP Bakery Page Builder Issues #503366

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Titles & Meta Settings not working #503334

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Map and autosave issues #503330

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Unable to add Listing from Home Page #503323

    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: Remove "Map,Satellite and Street view" from Map #503062

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Unable to add Listing from Home Page #503061

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: get_post_meta() name #503056

    Kiran
    Moderator
    Post count: 7069

    Hi Barbara,

    At the moment there is no meta key name for event start_date. To show event dates it has event_dates meta key which shows start date time & end date time. But sorry at the moment no separate key to show start_date.

    We have already task in our todo to allow show start date, end date, start time & end time. It will be in one of future version.

    Right now to achieve that you want do following things.

    1) Add following PHP snippet via plugin or theme functions.php file

    
    
    function gd_snippet_190814_output_event_dates( $output, $find_post, $args ) {
    	global $post;
    
    	$the_post = ! empty( $find_post->start_date ) ? $find_post : ( ! empty( $post ) && ! empty( $post->start_date ) && $post->ID == $find_post->ID ? $post : NULL );
    
    	if ( ! empty( $the_post ) && ! empty( $the_post->start_date ) && strpos( $args['badge'], '%%event_' ) !== false ) {
    		$date_format = geodir_event_date_format();
    		$time_format = geodir_event_time_format();
    
    		$output = $args['badge'];
    		$output = str_replace( '%%event_start_date%%', date_i18n( $date_format, strtotime( $the_post->start_date ) ), $output );
    		$output = str_replace( '%%event_end_date%%', date_i18n( $date_format, strtotime( $the_post->end_date ) ), $output );
    		$output = str_replace( '%%event_start_time%%', date_i18n( $time_format, strtotime( $the_post->start_time ) ), $output );
    		$output = str_replace( '%%event_end_time%%', date_i18n( $time_format, strtotime( $the_post->end_time ) ), $output );
    	}
    
    	return $output;
    }
    add_filter( 'geodir_output_badge_field_key_event_dates', 'gd_snippet_190814_output_event_dates', 20, 3 );

    2) Use following shortcodes.

    
    
    - For start date: [gd_post_badge key="event_dates" condition="is_not_empty" badge="%%event_start_date%%" bg_color="#ffffff" txt_color="#1339f0" alignment="center"]
    - For end date: [gd_post_badge key="event_dates" condition="is_not_empty" badge="%%event_end_date%%" bg_color="#ffffff" txt_color="#1339f0" alignment="center"]
    - For start time: [gd_post_badge key="event_dates" condition="is_not_empty" badge="%%event_start_time%%" bg_color="#ffffff" txt_color="#1339f0" alignment="center"]
    - For end time: [gd_post_badge key="event_dates" condition="is_not_empty" badge="%%event_end_time%%" bg_color="#ffffff" txt_color="#1339f0" alignment="center"]

    Kiran


    Kiran
    Moderator
    Post count: 7069

    Hi Vincent,

    Reviews & maps are basic features of the listing. Right now it is not possible to disable these features for specific listings via package. You can disable these for post type complexly but not for specific listings.

    You can hide reviews & maps via css for specific packages by using css class(ex: gd-post-pkg-x where x is package id).

    Regards,
    Kiran

    in reply to: Images for franchise replicate into multiple images #503042

    Kiran
    Moderator
    Post count: 7069
    This reply has been marked as private.
    in reply to: Layout of Event listings #503034

    Kiran
    Moderator
    Post count: 7069

    Hi Brian,

    Thanks for providing screenshot.

    To achieve what you asking, do following steps.

    1) Edit file \wp-content\plugins\geodirectory\includes\widgets\class-geodir-widget-post-meta.php and apply changes
    from here: https://github.com/AyeCode/geodirectory/commit/0f4505c7cee4cb5c99d3661979a4a0d86edbc706
    2) Add

    location="listing"

    in gd_post_meta shortcode. Ex:

    [gd_post_meta key="event_dates" show="icon-value" location="listing"]

    Or provide us FTP credentials to apply changes from our side.

    After doing above things, no need to add PHP snippet provided previously.

    Thanks,
    Kiran

    in reply to: Category not auto selected #503028

    Kiran
    Moderator
    Post count: 7069

    Hello,

    I’ve noticed that when someone selects a category from the category widget that when they arrive on the category page the search bar does not select the category.

    This has been implemented and it will be in next release.

    Kiran

    in reply to: Layout of Event listings #503019

    Kiran
    Moderator
    Post count: 7069

    to which file should this code be added?

    PHP snippet can be executed via plugin. There are many free plugins available on WordPress. Ex: https://wordpress.org/plugins/code-snippets/

    See for more info: https://wpgeodirectory.com/docs/useful-plugins/#snippets

    I need to display the events as per the criteria specified in the shortcode, but only display a single date/time for each item in the archive. Is that what this does?

    As you asked in your reply here #503005 “But is there a way to display just the date/time details of the current event, not all repeating ones”, above snippet will show only single event for all schedules of a recurring event on https://www.YOUR-SITE.com/events/ archive page.

    Kiran

    in reply to: Map not working #503011

    Kiran
    Moderator
    Post count: 7069

    Hi Alison,

    There is another an JavaScript error on page.

    TypeError: "$select2.data(...).$container is undefined"

    This error breaking the rest of JavaScript functionality including map on the page. You faced same issue in past. Please check here issue explained: https://wpgeodirectory.com/support/topic/maps-not-working-cant-add-listing-tags-not-working/#post-494622

    3.) I updated all GD Plugins (QUESTION: do ALL plugins need to be updated, or just GD?)

    I recommended you to update all the outdated plugins and outdated theme.

    Let us know.

    Thanks,
    Kiran

    in reply to: Layout of Event listings #503008

    Kiran
    Moderator
    Post count: 7069

    Hi,

    Use following PHP snippet to show single event on Events archive page.

    
    
    /**
     * Display single event on events archive page.
     */
    function gd_snippet_190814_posts_fields( $fields, $query = array() ) {
    	global $geodir_post_type;
    
    	if ( ! GeoDir_Query::is_gd_main_query( $query ) || ! GeoDir_Post_types::supports( $geodir_post_type, 'events' ) ) {
    		return $fields;
    	}
    
    	if ( ! empty( $fields ) ) {
    		$fields = str_replace( ', ' . GEODIR_EVENT_SCHEDULES_TABLE . '.*', '', $fields );
    
    		if ( isset( $_REQUEST['sort_by'] ) && $_REQUEST['sort_by'] != '' ) {
    			$sort_by = esc_attr( $_REQUEST['sort_by'] );
    		} elseif ( $order_by = get_query_var( 'order_by' ) ) {
    			$sort_by = $order_by;
    		} else {
    			$sort_by = geodir_get_posts_default_sort( $geodir_post_type );
    		}
    		$order = $sort_by == 'event_dates_desc' ? 'MAX' : 'MIN';
    		$fields .= ", " . $order . "( " . GEODIR_EVENT_SCHEDULES_TABLE . ".schedule_id ) AS set_schedule_id";
    	}
    
    	return $fields;
    }
    add_filter( 'geodir_posts_fields', 'gd_snippet_190814_posts_fields', 20, 2 );
    
    function gd_snippet_190814_posts_groupby( $groupby, $query = array() ) {
    	global $wpdb;
    
    	if ( ! empty( $groupby ) ) {
    		$groupby = str_replace( 'GROUP BY ' . $wpdb->posts . '.ID, ' . GEODIR_EVENT_SCHEDULES_TABLE . '.start_date', 'GROUP BY ' . $wpdb->posts . '.ID', $groupby );
    		$groupby = str_replace( $wpdb->posts . '.ID, ' . GEODIR_EVENT_SCHEDULES_TABLE . '.start_date', $wpdb->posts . '.ID', $groupby );
    	}
    
    	return $groupby;
    }
    add_filter( 'geodir_posts_groupby', 'gd_snippet_190814_posts_groupby', 20, 2 );
    
    function gd_snippet_190814_posts_order_by_sort( $orderby, $sort_by, $table, $query ) {
    	global $wpdb;
    
    	if ( ! empty( $orderby ) ) {
    		$min_max = $sort_by == 'event_dates_desc' ? 'MAX' : 'MIN';
    		$orderby = str_replace( GEODIR_EVENT_SCHEDULES_TABLE . '.start_date ', $min_max . '( ' . GEODIR_EVENT_SCHEDULES_TABLE . '.start_date ) ', $orderby );
    	}
    
    	return $orderby;
    }
    add_filter( 'geodir_posts_order_by_sort', 'gd_snippet_190814_posts_order_by_sort', 99, 4 );

    Kiran

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