Skip Navigation

[Resolved] The Event Calendar Pro – show only one event if it repeats on same day

This support ticket is created 6 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 6 replies, has 2 voices.

Last updated by Minesh 6 years, 1 month ago.

Assisted by: Minesh.

Author
Posts
#1148031

I am trying to:
Show only one event photo if event repeats itself on same day.

Link to a page where the issue can be seen:
hidden link (box 'co dzis gramy' - slider)

I expected to see:
One event - not multiple same events (in different hours)

Instead, I got:
Duplication of same featured image.

I got help before from you before: https://toolset.com/forums/topic/views-and-event-calendar-pro-date-offset-how-show-events-from-today/

and I made my own modification to display events from this day only (not sure if it is best way):

----

function tssupp_filter_event_query2( $view_args, $view_settings, $view_id ){

if ( in_array( $view_id, array( 187 ) ) ) { // Edit view IDs

if ( ! isset( $view_args['meta_query'] ) ) {

$view_args['meta_query'] = array();
}

$meta_query = array(

'key' => '_EventStartDate',
'value' => date("Y-m-d"),
'type' => 'NUMBER',
'compare' => '>'
);

$meta_query2 = array(

'key' => '_EventStartDate',
'value' => date("Y-m-d", strtotime('+1 day')),
'type' => 'NUMBER',
'compare' => '<'
);

$view_args['meta_query'][] = $meta_query;
$view_args['meta_query'][] = $meta_query2;

}

return $view_args;
}
add_filter( 'wpv_filter_query', 'tssupp_filter_event_query2', 101, 3 );

-----

In my view I display only featured image (in slider) but I don't know how to display only one if it occurs multiple times on this one day. Could you help me with that?

#1149098

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - could you please share what could be your expected results and I would be happy to debug this issue further.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#1149841

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - on this page: hidden link

I see the same event three times but I also see the same event has been added three times - I see in admin:
=> hidden link

Could you please share information on how to differentiate those three events based on what criteria?

#1149855

Yes, as I said there are repeated Events. If you add new event you could add more occurrences for one (type) event. They are visible in admin as different but they are connected (I can hide repeated event in admin in Calendar Event Pro settings). And I want to filter View with this connection. So if there are 3 same posters, I want display one.

And in second View I want one poster byt 3 starting hours.

It is not like they are whole different events.

#1149866

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - I see now that all three events have same post ID but now I try to access the FTP access but the shared FTP access details are not working. Could you please share working FTP access details.

#1150625

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thanks, but still FTP access details not working. Do I need to use any specific port?

When I try to connect to server I just get following error:

Could not connect to server

I have set the next reply to private which means only you and I have access to it.

#1151401

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - I checked the view is generating correct results as internally there are three different posts added but just title is same.

So, that is why its displaying three entries there is no fault of Toolset here the data structure you have. You need to find a way to group by post title.

Please check the following link that may help you - where you should try to pass your post title to group by:
=> https://toolset.com/2013/10/how-to-group-views-results-by-year-and-month/