elisef

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: Events List Widget month and date styling #951018
    elisef
    Participant

    Hello 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.

    in reply to: Events List Widget month and date styling #950931
    elisef
    Participant

    Hello 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

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