Let me test it on my end. Thanks.
Thank you very much, I will wait.
@gwalter75 If you want to just show future and recent posts (if I understand correctly) could you use the following shortcode:
[exclude_all_past_events='datum']
All you need is the name of the custom field as the argument. I see that you used “datum” as the custom field so only that and nothing else should appear as the argument.
Now as far as the shortcode you’re using you have:
show_after_date=”datum::show_after_date="datum::10 August 2024"
but it should simply be:
show_after_date="datum::10/08/2024"
Please let me know if either of these work for you.
Thanks, just tried that with this shortcode:
[netsposts include_link_title=’true’ wrap_start=” wrap_end=” include_blog=’3′ thumbnail=’true’ size=’medium_large’ post_type=’tribe_events’ include_acf_fields=’datum’ hide_excerpt=’true’ read_more_text=’ ‘ order_post_by_acf_date=’datum asc’ paginate=’true’ hide_acf_labels=’true’ exclude_all_past_events=’datum’]
Just tried it with that, then not a single event is shown.
Sorry, this one:
[netsposts include_link_title=”true” post_type=”tribe_events” include_acf_fields=”datum” order_post_by_acf_date=”datum asc” paginate=”true” hide_acf_labels=”true” exclude_all_past_events=”datum”]
-
This reply was modified 1 year, 6 months ago by
Gwalter75.
Are they not showing properly or all events showing? That is you only want to include posts of post_type='tribe_events' correct?
Is datum the custom field created by Events Calendar plugin? If so mine only works with the date picker field in the ACF plugin.
Post type is tribe_events and I use the date picker ACF field. They are showing not at all, as soon as I add exclude_all_past_events. Without that, all are showing as they should.
Okay I have to rewrite some code. Will maybe take a few weeks.
I see the mix-up in the understanding of the plugin. With the following parameter, show_after_date=“datum::show_after_date" the plugin will show all posts that have a date in the date picker field that is after what is in the shortcode. So for example:
show_after_date='datum::12/25/2024' post_type='tribe_events'
will only show posts that have a selected date in the date picker field after December 25th. So if you have three events and the date picker field shows for the three events as such:
- 23 November 2024 (will not be shown)
- 01 December 2024 (will not be shown)
- 28 December 2024 (will be shown)
The confusion is the parameter isn’t saying only show the plugin after a specific date but the posts that have a date in the date picker field later than the one in the shortcode.
One more thing. show_after_date and exclude_all_past_events don’t work together. So to make it simple in the following shortcode:
[netsposts post_type='tribe-events' exclude_all_past_events='datum'] will only display posts that have a date of today or in the future. It will hide all posts listed in the past.
show_after_date and show_before_date will work together if you have two date fields.
[netsposts post_type='tribe-events' show_after_date='datum::10/15/2024' show_before_date='datum_2::12/25/2024']
will only show posts that have posts where the datum field is after 15 October 2024 and posts that have a datum_2 field before 25 December 2024.
Yes, but I did not combine show_after or show_before withz exclude_all_past_events.
so you have upcoming events with a future date in the date picker field not showing?
Exactly – you can have a look at the whole thing if you wish to, just tell me where to send the details.
WordPress doesn’t allow me to do this. Let me test it on my end first.