Showing day and month outside of list-widget

Home Forums Calendar Products Events Calendar PRO Showing day and month outside of list-widget

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #946834
    ite
    Participant

    Hi,
    I want to show the daynumber and month of an event in two separated string.
    I have found a code in the file list-widget.php, but when using this string it either shows “1” & “Jan” og todays date.

    How may I pull this string wherever inside a loop?

    #946883
    Brian
    Member

    Hi,

    Thanks for using our plugins. I can help get you in the right direction on this.

    Can you provide a link to a pastebin(it is free and do not need an account) or gist of the coding you are using for this.

    I can help make recommendations based on that.

    Thanks

    #946887
    ite
    Participant

    Hi,
    this is how I try to show the dayname:
    http://pastebin.com/QzNjcCmG

    And here is the code I have in the page sidebar. I show the activity using Advanced Custom Fields on employees profile-pages:
    http://pastebin.com/68ua84an

    Hope this helps 🙂

    #947099
    Brian
    Member

    Ok thanks for that.

    Have you included this above that coding:

    $startDate = strtotime( $post->EventStartDate );
    $endDate = strtotime( $post->EventEndDate );
    $today = time();

    /* If the event starts way in the past or ends way in the future, let's show today's date */
    if ( $today > $startDate && $today < $endDate ) {
    $postDate = $today;
    } else {
    $postDate = $startDate;
    }

    If you add that does it work then?

    Let me know.

    Thanks

    #947170
    ite
    Participant

    Hi, this code still shows todays date.

    I have also edited the file single-event.php and added this in /MyThemefolder/tribe-events/
    This shows correct date and you may see the code here: http://pastebin.com/GKw75Fks

    Does this help any further?

    #947182
    Brian
    Member

    I reduced the coding down to this and got it to work:

    $startDate = strtotime( $post->EventStartDate );
    $endDate = strtotime( $post->EventEndDate );
    $today = time();
    /* If the event starts way in the past or ends way in the future, let's show today's date */
    if ( $today > $startDate && $today < $endDate )
    $postDate = $today; else
    $postDate = $startDate;

    ?>
    <div class="icon-date">
    <h3><?php echo date_i18n( 'M', $postDate ) ?></h3>
    <h4><?php echo date_i18n( 'd', $postDate ) ?></h4>
    </div>

    You have to remove the filter for it to display.

    Also you will have to grab the css or use your own to style how you would like.

    That should get you started on your customization so you can take it from here.

    Thanks

    #947185
    ite
    Participant

    This reply is private.

    #947192
    Brian
    Member

    The Event List Widget is showing today’s date?

    If so looks like a theme conflict, can you please follow our testing for conflicts guide:

    Testing Conflicts With Themes and Other Plugins

    And see if that resolves the issue.

    Thanks

    #947198
    ite
    Participant

    Hi, as you may see in the code from the last post from me (http://pastebin.com/3wspsW26) the code that shows the event (and the wront date) is coded in the sidebar. It do not use the Event List Widget and trying a different theme would not work as the code is in the template files 🙂

    #947339
    Brian
    Member

    Unfortunately, I am unable to troubleshoot custom coding as it is beyond the support we can provide. If it was the Event List Widget I can help out otherwise for customizations we can point you in the right direction and you are going to have to take it from here.

    #959538
    Brian
    Member

    Since there is has not been any activity on this thread for over 2 weeks so I am now closing it. Feel free to start a new thread if you have further issues. Thanks! 🙂

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Showing day and month outside of list-widget’ is closed to new replies.