• Hello there!

    I have the following shortcode:

    [netsposts include_link_title=”true” 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” show_after_date=”datum::show_after_date=”datum::10 August 2024″]

    My Date format in the ACF Fiel ist j. F Y, the way I type it, is exactly as shown in the field. Still the posts from the event calendar are not filtered at all. What do I do wrong?

    Thanks!

Viewing 15 replies - 1 through 15 (of 20 total)
  • Plugin Author johnzenausa

    (@johnzenausa)

    Let me test it on my end. Thanks.

    Thread Starter Gwalter75

    (@gwalter75)

    Thank you very much, I will wait.

    Plugin Author johnzenausa

    (@johnzenausa)

    @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.

    Thread Starter Gwalter75

    (@gwalter75)

    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.

    Thread Starter Gwalter75

    (@gwalter75)

    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 7 months, 1 week ago by Gwalter75.
    Plugin Author johnzenausa

    (@johnzenausa)

    Are they not showing properly or all events showing? That is you only want to include posts of post_type='tribe_events' correct?

    Plugin Author johnzenausa

    (@johnzenausa)

    Is datum the custom field created by Events Calendar plugin? If so mine only works with the date picker field in the ACF plugin.

    Thread Starter Gwalter75

    (@gwalter75)

    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.

    Plugin Author johnzenausa

    (@johnzenausa)

    Okay I have to rewrite some code. Will maybe take a few weeks.

    Plugin Author johnzenausa

    (@johnzenausa)

    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.

    Plugin Author johnzenausa

    (@johnzenausa)

    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.

    Thread Starter Gwalter75

    (@gwalter75)

    Yes, but I did not combine show_after or show_before withz exclude_all_past_events.

    Plugin Author johnzenausa

    (@johnzenausa)

    so you have upcoming events with a future date in the date picker field not showing?

    Thread Starter Gwalter75

    (@gwalter75)

    Exactly – you can have a look at the whole thing if you wish to, just tell me where to send the details.

    Plugin Author johnzenausa

    (@johnzenausa)

    WordPress doesn’t allow me to do this. Let me test it on my end first.

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘show_after_date not working’ is closed to new replies.