Show clicked date for event with start & end date

Home Forums Calendar Products Events Calendar PRO Show clicked date for event with start & end date

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1216420
    Erik
    Participant

    Hello,

    A little question about customization, hope you could give a hint.
    I have an event with a start date and an end date (long events, 2 weeks+), showing off different seasons in an amusement park.
    (Example: June 1 -> June 14).

    When I click on the event from my calendar I get the start and end date, as well as the text I’ve added.
    -But-
    I’d also (or – Instead) like to display the date the user has clicked on. Do you figure this can be done through some guide or such?

    Pretty much to make it show what date you’ve clicked (ex. June 5)

    From:
    Season A
    June 1 – June 14

    Into this instead:
    Season A
    June 5
    (Or showing the clicked date, as well as the start & end date)

    Thankful for any tips. I am using both the full calendar en the mini-widget calendar, and would like this function on both.

    #1216853
    Josh
    Participant

    Hey Erik,

    Thanks for reaching out to us!

    Unfortunately I won’t be able to give you a detailed description on how to accomplish what you’re looking for, hopefully I can help to get you pointed in the right direction.

    To start, take a look at our Themer’s Guide to see how to copy template from the core plugin into your theme files.

    From there, take a look at our “views > templates > month > single-event.php” file. Using the template at the very bottom, you could customize the link for the event to include a query argument for the date like so:

    
    <a href="<?php echo esc_url( $link . '?date=' . $day['date'] ); ?>" class="url">
    

    From there, you could add a check on the single event template to see if that “date” parameter had been passed. If so, display that date where you would like.

    Let me know if this helps.

    Thanks!

    #1228230
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Show clicked date for event with start & end date’ is closed to new replies.