WordPress.org

Ready to get started?Download WordPress

Forums

The Events Calendar
Date format in list widget (4 posts)

  1. foxy123
    Member
    Posted 2 years ago #

    Hi,
    Is there some easy way to change the layout of the list view widget or will I need to edit the code? I would like to change the date output and remove the new line within an entry to compact things a bit more.

    thanks

    Great plugin guys... configuring it for my demo site and planning to go pro with the community add-on when we go live :)

    http://wordpress.org/extend/plugins/the-events-calendar/

  2. jonahcoyote
    Member
    Posted 2 years ago #

    Hey foxy123, you will need to edit the code to do this but it's not too bad. Just override: /wp-content/plugins/the-events-calendar/views/events-list-load-widget-display.php - by placing a copy in an 'events' folder in your theme. Then on line 45 you should have this (or find this):

    echo tribe_get_start_date( $post->ID );

    Simply modify that to:

    echo tribe_get_start_date( $post->ID, false, 'M Y' );

    Change what's in the single quotes to whatever format you want to use with the PHP formatting guidelines: http://php.net/manual/en/function.date.php

  3. foxy123
    Member
    Posted 2 years ago #

    great thanks, that's perfect. Handy to know that it uses the 'events' folder for tweaks. I missed that in the docs.

  4. jonahcoyote
    Member
    Posted 2 years ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic