• Resolved ptom98

    (@ptom98)


    I want to create a link that takes the user to a page which is filtered byt he specified date range. I don’t want to have to create tonnes of pages with different shortcodes on and am wondering if it’s possible to have one page and add url parameters to get it filter?

    Messing around I’ve found I can add ?search_keywords=test for it to filter the results by the keyword, but am wondering if i can do the same by specifying a date range or date phrase (.ie. “this week”, “next month”).

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi @ptom98

    We have a shortcode for date range, You can use, [selected_datetime=”xxx,xxx”]
    making sure, the format is same as the one you have selected in settings.

    Regards,
    Priya

    Thread Starter ptom98

    (@ptom98)

    As mentioned I don’t want to create a unique page for each one, I want to be able to have one page that I can link to and specify the date range in the url.
    Much like how i mentioned in my first comment that you can do with comments;

    Adding ?search_keywords=test to the url where the widget is forces it search via keyword, is there no way to do this with?

    For example can I make the url something like;

    ?keywords=event&selected_datetime=today,tomorrow
    ?keywords=event&selected_datetime=this-monh,next-month

    • This reply was modified 2 years, 10 months ago by ptom98.

    Hi @ptom98

    Please consult a developer for private customizations. This is not included in our support. (https://wp-eventmanager.com/support-policy/)

    Regards,
    Priya

    Thread Starter ptom98

    (@ptom98)

    Odd, really? Messing around with it and it requires no customisations just and understand of the fields.

    Adding this to the end of the url to where you’re listing events allows you to link and specify certain conditions;

    ?search_keywords=my%20search&search_datetime=2022-05-04%2C+2022-05-10&search_category=cat1

    search-words > any search terms you want to filter by
    search_datetime > either a single date or two dates separated by a comma in the format YYYY-MM-DD
    search_category > the slug of any category you want the results filtered by

    • This reply was modified 2 years, 10 months ago by ptom98.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Creating a link to a date range’ is closed to new replies.