Home › Forums › Calendar Products › Events Calendar PRO › Change Featured Event Widget Date to Feb, instead of February…
- This topic has 9 replies, 4 voices, and was last updated 8 years, 10 months ago by Support Droid.
-
AuthorPosts
-
February 3, 2012 at 5:33 pm #14682RichParticipant
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
February 6, 2012 at 7:39 am #14710RobMemberThanks 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.
February 6, 2012 at 9:57 am #14733RichParticipantUnfortunately, 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
February 6, 2012 at 9:58 am #14734RichParticipanti’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’).’)’;February 6, 2012 at 8:44 pm #14764RobMemberThanks 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.
February 7, 2012 at 9:00 am #14796RichParticipantthanks that would be great!
February 7, 2012 at 1:29 pm #14822JonahParticipantHey 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,
JonahFebruary 19, 2012 at 11:17 am #15389RichParticipantthanks for this Jonah, and sorry for the late reply…I was out of town for 2 weeks.
February 20, 2012 at 9:32 am #15395JonahParticipantNo problem Rich and you’re welcome, I’m glad that worked out for you!
July 4, 2015 at 5:00 pm #975647Support DroidKeymasterThis 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. -
AuthorPosts
- The topic ‘Change Featured Event Widget Date to Feb, instead of February…’ is closed to new replies.