Skip Navigation

[Resolved] Show related posts based on date & time

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.

This topic contains 5 replies, has 2 voices.

Last updated by katerinaA 1 year, 11 months ago.

Author
Posts
#2531811

I am trying to show the related posts a particular post based on date custom field.
I created a site in discover-wp.com to recreate the need.
Lets say we have an Event (custom post type) which hosts Speakers (custom post type)
Each Speaker will give one or more speeches during this event, so I'm trying to show the "Speaking Now" Speakers, in real time, based on a date & time custom field. The Speaker may speak several times during the Event, so adding a date & time custom field to their relationship doesnt really do the job!

Any ideas on how to achieve the above?

#2531813

how can I send you link and access to my demo site?

#2531895

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi there

I would direct you to set up a many-to-many relationship between Events and Speakers, with the date/time recorded in a relationship custom field.

Then, not only could you have multiple speakers at an event, and the same speakers could speak at different events, but you could have connections that were like "Jack Flint speaks Friday 19:30 at Modern Spycraft 2023" and "Jack Flint speaks Sunday 16:00 at Modern Spycraft 2023", and then query for such connections based upon the date field.

Except, Types relationships do not support connecting the same posts multiple times (albeit with different relationship field vaues) in this way.

That is how you need to set it up, but it's not possible with Toolset, I'm afraid.

#2531909

Thank you for your prompt answer...
I got a bit confused! In your "example" you mention "Jack Flint" speaking at the same event at two different hours.
But later on you tell me that this is not possible with Toolset!

So are you suggesting something that I didnt get, or are you telling me to find another way to show the Speakers multiple times?

Ty

#2532017

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I was explaining how you would do it, if it were possible.

But, unfortunately it is not possible, because Toolset relationships do not let you connect the same posts to each other more than once, so you cannot have the same speaker appear at the same event more than once.

It is a request that has come up from time to time, but unfortunately it has not been implemented.

#2532755

Thank you for the information!