Change Featured Event Widget Date to Feb, instead of February…

Home Forums Calendar Products Events Calendar PRO Change Featured Event Widget Date to Feb, instead of February…

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #14682
    Rich
    Participant

    Hey There! I just bought the pro license yesterday and I am so impressed with this plugin. I’ve used a few of the others, and this is by far the easiest to work with…We are using the advanced featured event widget, and would like to be able to customize the way the date is displayed…currently it says (for example) February 22, 2012 and we love for it to merely say Feb 22…is there a way for us to accomplish this?

    Thanks so much!

    Rich

    #14710
    Rob
    Member

    Thanks for the words, Rich – we certainly appreciate it. On the widget side: I can definitely get our dev Jonah to chime in as needed, but have you checked out this tutorial we put together on how to fully customize widgets? It may be enough to point you in the right direction. Check it out: https://theeventscalendar.com/how-to-completely-customize-widgets/.

    Let me know if that’s not detailed enough and we can provide further guidance.

    #14733
    Rich
    Participant

    Unfortunately, I think that confused me more! Here is what I did to get to where we are…you can see it here:
    http://thorne.wpengine.com/

    I copied the widget-featured-display.php into an events folder which I placed at the root of my theme folder. I changed a bit of the hierarchy to fit our design. I was hoping there was a way to alter this inline:

    ID, isset($start) ? $start : null );

    if($event->AllDay && $start)
    echo ‘ (‘.__(‘All Day’,’tribe-events-calendar-pro’).’)’;
    ?>

    …namely, echo tribe_get_start_date( $post->ID, isset($start) ? $start : null ); so that it would use the shortened variation of date, and remove the year.

    Do I really need to unregister the current widget and create a new one to accomplish this? If so, I’ll need to look into that article a bit more.

    Thanks for the help thus far.

    Rich

    #14734
    Rich
    Participant

    i’m guessing this strips any tags, let me try this again:

    echo tribe_get_start_date( $post->ID, isset($start) ? $start : null );

    if($event->AllDay && $start)
    echo ‘ (‘.__(‘All Day’,’tribe-events-calendar-pro’).’)’;

    #14764
    Rob
    Member

    Thanks Rich. Bummer to hear that link didn’t do the trick; let me see if our dev Jonah (who wrote that walkthrough originally) can chime in here with some thoughts when he hits the forum tomorrow morning.

    #14796
    Rich
    Participant

    thanks that would be great!

    #14822
    Jonah
    Participant

    Hey Rich, you can modify the date format in the tribe_get_start_date function by passing your date format as the third argument like so:


    echo tribe_get_start_date( $post->ID, isset($start) ? $start : null, 'M' );

    There are some more examples in our documentation: https://theeventscalendar.com/support/documentation/the-events-calendar-template-tags-date-functions/#functiontribe_get_start_date

    I hope that helps but let me know if you have any other questions on this.

    Thanks,
    Jonah

    #15389
    Rich
    Participant

    thanks for this Jonah, and sorry for the late reply…I was out of town for 2 weeks.

    #15395
    Jonah
    Participant

    No problem Rich and you’re welcome, I’m glad that worked out for you!

    #975647
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Change Featured Event Widget Date to Feb, instead of February…’ is closed to new replies.