Home Forums General Issues Custom fields as related days and times


Custom fields as related days and times

  • Hi,

    I have a problem that should be simple but that I’m struggling with, so I hope someone could help me:

    I need to build a form for classes on various activities, for which I created a custom post type “Activity”.
    Each activity can take place on any one or more weekdays, in different random timeframes, for example:
    Day Start End
    Monday 8:30 9:00
    Wednesday 12:00 15:00
    Saturday 18:00 19:30

    I can make custom fields for all of these, but to be able to perform relevant searches in the front end, I need them to be related in some way. In other words, the days, start dates and end dates must be related “vertically” to appear in the same search (which would be the case if the days where in a list for example, but not if each field has a different name), while still keeping each day related to its relevant start and date time “horizontally”- which is not possible if I use lists, or any other field type that I can think of.
    If my custom fields are structured properly, I have no problem making the queries that return the correct searches (for instance find all activities that happen at 6pm on saturdays), but if the times and days are unrelated, it will return meaningless results.

    Perhaps I’m an idiot and I’m approaching this from a totally wrong perspective, but that’s where I am at the moment!

    Thanks for any help,

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.