Forum Replies Created
-
AuthorPosts
-
elisef
ParticipantHello Brian
thanks, that got me closer. With some PHP help from a friend, we figured out the following code works in
/wp-content/themes/[mytheme]/tribe-events/widgets/list-widget.php<ol class="hfeed vcalendar"> <?php foreach ( $posts as $post ) : setup_postdata( $post ); $postDate = strtotime( $post->EventStartDate ); ?> <li class="tribe-events-list-widget-events <?php tribe_events_event_classes() ?>"> <div class="event"> <div class="date"> <span class="month"> <?php echo date_i18n( 'M', $postDate ); ?> </span><br> <?php echo date_i18n( 'd', $postDate ); ?> </div> <?php do_action( 'tribe_events_list_widget_before_the_event_title' ); ?> <!-- Event Title --> ' with the CSS.event .date {
margin-left: 5px;
padding-top: 6px;
background-image: url(/wp2/wp-content/uploads/resources/datebkgd.png);
width: 71px;
height: 71px;
font-size: 31px;
font-weight: normal;
color: #fff;
text-align: center;
float: right;
}
.event .month {
font-size: 12px;
font-weight: normal;
color: #fff;
line-height: 30px;
text-transform: uppercase;
padding-left: 4px;
}`cheers,
E.elisef
ParticipantHello Brian
thanks for the fast response! I’m sorry I should have been clearer. My challenge is in fact with the “upcoming events” widget, rather than the “events calendar” widget.
I have sorted out the CSS, but need help with the list-widget.php file. In particular, how do I change this code to show month and date?
<?php foreach ( $posts as $post ) : setup_postdata( $post ); ?> <li class="tribe-events-list-widget-events <?php tribe_events_event_classes() ?>"> <div class="event"> <div class="date"> <span class="month"> month </span><br> 99 </div> <?php do_action( 'tribe_events_list_widget_before_the_event_title' ); ?> <!-- Event Title -->What hooks do I use where I’ve got “month” and “99” (the event date) shown?
thanks,
Ernest -
AuthorPosts
