Skip Navigation

[Resolved] Group Views results by day

This support ticket is created 4 years, 11 months 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 5 replies, has 2 voices.

Last updated by bobA-2 4 years, 11 months ago.

Assisted by: Minesh.

Author
Posts
#1435631

From the example here https://toolset.com/2013/10/how-to-group-views-results-by-year-and-month/ I am grouping view by date. This works fine and shows <h5>Date Header </5> above the loop content.

In a view I have query filter one of those set by the View shortcode and I call this view multiple times in the same post with different view shortcode value.

The issue is that grouping header only is shown for the first instance of the view in the post. Any way around this?

#1436009

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Can you please share information in what format you want to display the output, I mean, where exactly you want to repeat the date header and where exactly you place your header.

A full screenshot of your edit view page will be helpful to check your view's settings.

Once you share this information and I review it I will be able to guide you in the right direction.

#1436019
view code1.png
header grouped.png

Here are a couple of images to explain it.

#1437645

Minesh
Supporter

Languages: English (English )

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

Based on the screenshot you shared - I see you are grouping post by month.

As I understand - you want to group your post by month - correct? If yes, I need to review your on your install the current setup.

Can you please share the problem URL where you added the view.

*** 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 have set the next reply to private which means only you and I have access to it.

#1442165

Minesh
Supporter

Languages: English (English )

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

Can you please check now: hidden link

I've changed the heading shortcocde value argument as given under:

[heading condition="month" value="[types field='start-time' style='text' format='F'][/types] [types field='start-time' style='text' format='l j'][/types] [wpv-attribute name='wpvtvchannel']"]

Also, Toolset offers the place where you can add your custom code, so I've moved the heading shortcode you added from functions.php file to "Custom Code" section offered by Toolset:
=> hidden link

I can see its working now. Can you please confirm.

#1442289

Thanks indeed it seems to work now. Thanks a lot