Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jeroen Schmit

    (@slimndap)

    Roxanne!

    Glad you like it.

    Add this code to the functions.php of your theme:

    /**
     * Changes the date format for the day group header.
     *
     * @param	string	$group_header	The default group header.
     * @param 	string	$day			The day in <code>YYYY-MM-DD</code> format.
     * @return	string					The new group header.
     */
    function roxanne_change_group_day_date_format( $group_header, $day ) {
    	return date_i18n( 'l d F Y',strtotime( $day ) );
    }
    add_filter('wpt_listing_group_day', 'roxanne_change_group_day_date_format');
    Thread Starter Rnlhellevoort

    (@rnlhellevoort)

    Thanks Jeroen!

    I added it to the functions.php, but this is the warning I get:

    Warning: Missing argument 2 for roxanne_change_group_day_date_format() in /home/patrickn/public_html/wp-content/themes/pique/functions.php on line 329

    Do you know why..?

    Thanks again!

    Plugin Author Jeroen Schmit

    (@slimndap)

    This should fix that:

    /**
     * Changes the date format for the day group header.
     *
     * @param	string	$group_header	The default group header.
     * @param 	string	$day			The day in <code>YYYY-MM-DD</code> format.
     * @return	string					The new group header.
     */
    function roxanne_change_group_day_date_format( $group_header, $day ) {
    	return date_i18n( 'l d F Y',strtotime( $day ) );
    }
    add_filter('wpt_listing_group_day', 'roxanne_change_group_day_date_format', 10, 2);
    Thread Starter Rnlhellevoort

    (@rnlhellevoort)

    Awesome!! Thanks so much!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘groupby="day" only shows day and month, no year’ is closed to new replies.