dave9621

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: list-widget override for ver. 3.6.1 #469799
    dave9621
    Participant

    Thanks for following Casey. Yes, I was able to follow your steps and with a little trial and error got my events working properly. Thanks for the help!

    in reply to: Date range #236680
    dave9621
    Participant

    Barry, thanks for the guidance, I finally figured it out. If anyone else is looking for a function that adds the current year and formats the date range if the event is over multiple dates, here’s my code if someone else is looking to solve this issue. Thanks again for you help!

    add_filter( ‘tribe_events_event_schedule_details’, ‘custom_schedule_details’ );

    function custom_schedule_details() {
    /* get the year of the event */
    $endYear = tribe_get_end_date($pageID, false,”Y”);
    /* get the date of the event, only the number, no month or year */
    $endDate = tribe_get_end_date($pageID, false,”j”);
    /* find out if the event is more than one day long */
    if ($endDate != tribe_get_start_date($pageID, false,”j”)) {
    /* if start day and end day are NOT equal then return the date range, including the year */
    return tribe_get_start_date($pageID, false,”F j”) . ‘ – ‘ . $endDate . “, ” . $endYear;
    } else {
    /* if the event is only a single day return the date, including the year */
    return tribe_get_start_date($pageID, false,”F j”) . “, ” . $endYear;
    }
    }

    in reply to: Date range #233615
    dave9621
    Participant

    Thanks Barry. Any chance you can give me a little more help? If you point me in the right direction I might be able to figure this out. For instance, in my template override I have the date being displayed by this line of code:
    <?php echo tribe_events_event_schedule_details(); ?>
    Can you give me an example of how to build a callback with the two functions you referenced?

    in reply to: Date range #230075
    dave9621
    Participant

    Hi Barry, thanks for helping me. I deactivated all plugins except for Events Calendar and Events Calendar Pro, no affect. I switched to the 2012 theme and that had no affect, still getting the improper date range. I double checked my functions.php and there is no code in there regarding the dates. I did have it in there at one time before upgrading to 3.6, since 3.6 had the date code fix I needed (adding the year no matter if it’s this year or not) in the settings panel I removed it. I have set in the Events settings for the display of “Date without year” to “F j, Y” this is what’s causing the trouble I think. When I make it “F j” then I get “October 23-26” BUT I need it to be “October 23-26, 2014”, we ALWAYS want the year to appear on our dates. Is there a code for that?

Viewing 4 posts - 1 through 4 (of 4 total)