Table of Contents
Certificate Archive for LearnDash Filters
Show LearnDash Course Title #
add_filter( 'ea_certificate_archive_show_course_title', '__return_true' );
Change Date Format #
/**
* Filter the format of the date shown on the Certificate archive page
*
* @param string $formatted_date Default: gmdate( ' - jS F Y', $certificate_data['timestamp'] )\
* @param string $unix_timestamp Unformatted Unix timestamp.
*/
$certificate_title .= apply_filters( 'ea_certificate_archive_change_date_format', gmdate( ' - jS F Y', $certificate_data['timestamp'] ), $certificate_data['timestamp'] );
add_filter( 'ea_certificate_archive_change_date_format', function( $formatted_date, $unix_timestamp ) {
// format the unix timestamp anyway you want and return it.
//for example YYYY-MM-DD (2024-03-06):
return gmdate( ' - Y-m-d');
}, 10, 2) ;
The part ‘ – xxx is to get the spacing and hyphen between the course/certificate title and the date.