• Resolved pilam

    (@pilam)


    Hi,

    I have a number of events happening throughout the year and want to display those which are Published (Events which have happened) and Scheduled (Events still to come), via the widget. I have a number of Events which are not yet confirmed so they are held as “Draft” status. (I tried this with Pending Review but that doesn’t work either).

    There are four Status options for the widget: Default, All, Published and Scheduled. Default and All status show all Events (whether Draft, Pending Review, Published or Scheduled). Published only shows those Events which have happened, and Scheduled only shows Events which are upcoming. There appears to be no way to show all Events for the year without Draft and Pending Review Events appearing as well.

    I believe the options should show:
    Default = Events with Status “Published” or “Scheduled”
    All = All Events including Draft and Pending Review
    Published = All past Events
    Scheduled = All upcoming Events

    If that’s not the case, what’s the difference between Default and All, and how can I achieve a list of Published and Scheduled Events without having Drafts included?

    Thanks for your help with this.

Viewing 15 replies - 1 through 15 (of 16 total)
  • Roch

    (@rochesterj)

    Hi!

    Thanks for reaching out.

    Default is the default WordPress behavior, which can be changed via custom code. It is the same as All in a non-modified WordPress install.

    You could achieve this custom list with a bit of custom code. Unfortunately we don’t have this option at the moment.

    Thanks!

    Thread Starter pilam

    (@pilam)

    Hi Roch,

    Thanks for the feedback. Default and All being the same in a non-modified install notwithstanding, how can it be justified that Draft and Pending Review events appear in the widget?

    Surely these should never appear to the outside world until they are Published or Scheduled?

    Thanks.

    Roch

    (@rochesterj)

    Hi!

    Thanks for your reply.

    They load all elements, therefore they include drafts and pending events ??

    There are use cases for this, so that’s a good option to have.

    Thanks!

    Thread Starter pilam

    (@pilam)

    Sorry, but that’s the most ridiculous response I’ve read for ages.

    Published means it’s viewable. Draft means it’s not ready. Under what possible circumstances can displaying a draft event be “a good option to have”?

    Roch

    (@rochesterj)

    Hi pilam

    Politeness is always appreciated. So I’m tagging the mods here to make sure this doesn’t escalate. We are trying to help you here, there’s no need to be rude.

    As for the feature itself if you don’t have a use case for it that’s fine, just don’t use it.

    Back to your issue, you can simply use 2 elements to do what you want. Or you could use a calendar to group the events you want. Another option is simply using the events list shortcode.
    https://support.themeboy.com/article/105-event-list-shortcode

    For instance, this one works just fine:
    [event_list status="publish, future" number="-1" columns="event,teams" show_all_events_link="0" align="none"]

    Thanks

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    Politeness is always appreciated. So I’m tagging the mods here to make sure this doesn’t escalate. We are trying to help you here, there’s no need to be rude.

    It won’t.

    Sorry, but that’s the most ridiculous response I’ve read for ages.

    As replies go that’s not too bad (that’s an understatement, some users have lost it).

    But @pilam please keep it civil here. You are not a customer, you’re a user. The author here is not a company, he’s a volunteer. If you don’t like a polite reply then move on and leave the plugin behind.

    You’re not owed even a reply so let’s all keep it polite, OK?

    • This reply was modified 5 years, 6 months ago by Jan Dembowski. Reason: Silly grammar mistakes
    Thread Starter pilam

    (@pilam)

    Thanks Jan, but there’s no danger of escalation into anything here, at least not on my part. But let’s try and get this resolved…

    I said it was ridiculous, because there is no software in the world that I am aware of which displays draft documents to the outside world. Perhaps somebody can tell me if it is normal for a WordPress item to effectively be published when it’s marked as a draft? If so, then I will take your advice, move on, and leave the plugin, and WordPress, behind.

    But if that is not the case and this is in fact a bug, or something else, then perhaps I might be accorded some civility for attempting to assist Themeboy in improving their software. I am not averse to a polite reply – indeed I have interacted with other volunteers here and situations have always been resolved amicably, if not always in the way I envisaged.

    It’s a pity that my efforts to identify a possible bug are not deemed worthy of a reply, because my question remains unanswered. It was I who was trying to help, and I wasn’t looking for a workaround – that I can accomplish myself. But if a support engineer/volunteer/whatever the title doesn’t understand the meaning of my question then we’re not going to make much progress unless that is reviewed by another.

    The world has clearly changed since my days in software support and development. So can somebody please just answer my question?

    Plugin Contributor Savvas

    (@savvasha)

    Hi @pilam ,

    SportsPress mostly using native WordPress functions for integrity, maintenance and security reasons. In the case of the Event List widget and the status criterion, we are utilize the WP_Query function and specifucally the status parameter as you can see here.

    The Default option is just to avoid the override of a status parameter that was set in the Calendar itself. The rest All, Published and Scheduled are self-explanatory I think. As you can see from the above link:

    ‘any’ – retrieves any status except those from post statuses with ‘exclude_from_search’ set to true (i.e. trash and auto-draft)

    It will be better, you think, to have another option (i.e. Published+Scheduled) so as to avoid showing draft events?

    Thanks,
    Savvas

    Thread Starter pilam

    (@pilam)

    Hi @savvasha ,

    Thanks for picking this up. Fundamentally yes. It may be that because an Event is, by definition, time based, this is causing confusion since it appears it is defined as “Scheduled” before it occurs, and “Published” afterwards. My argument is that both states are basically Published. Publishing is the act of releasing an item in its final state. (It might be easier to refer to before and after Events as “Scheduled” and “Past” or something like that, rather than reusing a term which means something else).

    A Draft item however, is never Published until it’s status is changed to such. This should be true of Events, Pages, Posts, whatever. While your suggestion would work, I’d approach it from a different angle and, rather than have an option of “Published +Scheduled”, an alternative might be the equivalent of All Published (which includes all Scheduled and Past Events) and All + Drafts (which is self-explanatory and includes everything).

    Personally, I can’t envisage a situation where I’d want to see ANY drafts displayed in the widget to my users, but @rochesterj said there are “use cases” for this, so fair enough.

    Thanks,

    Pilam.

    Plugin Contributor Savvas

    (@savvasha)

    Hi @pilam ,

    A plugin with the flexibility of SportsPress can be used in a million different user cases. We should consider though to add another option to the drop-down list so as to differentiate between published, scheduled and draft events.

    Thanks for your feedback,
    Savvas

    Thread Starter pilam

    (@pilam)

    Hi @savvasha ,

    Yes, of course there are many ways to use it. But looking back at this thread, I can’t help thinking we’ve been derailed a bit by the earlier, somewhat over-reactive response. And I have to say, I still can’t envisage any circumstance in which an admin would want any kind of draft – things which are currently being worked on – displayed to the world at large before they are ready for release. If anybody could give me an example I’d love to hear it as I might be missing something here which may be of benefit.

    The only problem is with Draft events. Published and Scheduled Events can be controlled either by the status, or by the date range, or both. While my preference would be for Draft Events never to appear in the widget prior to publication, an option to exclude Draft Events from the widget is all that is needed for this to work. Not the most elegant way, IMO, but adequate.

    Many thanks,

    Pilam.

    Plugin Contributor Savvas

    (@savvasha)

    Hi @pilam,

    Your original request was how to show just Published and Scheduled events in an event list. With the below commit, I created an extra option Published + Scheduled that fills your request.

    https://github.com/ThemeBoy/SportsPress/commit/c6cbd414d93c0f3fea0c2744f5f4dd3aa36c4720

    Thanks,
    Savvas

    Thread Starter pilam

    (@pilam)

    That’s excellent thanks @savvasha !

    Many thanks,

    Pilam.

    Thread Starter pilam

    (@pilam)

    Hi @savvasha

    I’ve just updated to Version 2.6.15 where the notes said that this option has been implemented, but it doesn’t show in the Event List widget??? It’s still just the four original Status options.

    I’m also using SportsPress for Golf. Would this affect it?

    Thanks,

    Pilam

    Plugin Contributor Savvas

    (@savvasha)

    Hi @pilam,

    The final implementation was a little bit different. If you use the All option now, it will show ONLY Published and Scheduled events.

    Thanks,
    Savvas

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Event List Widget’ is closed to new replies.