Last active
October 14, 2019 12:27
-
-
Save 99manish/22aa31083859b81aaad80470fe335ed0 to your computer and use it in GitHub Desktop.
Add last modified in course header
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('bp_after_course_header', function() { | |
global $wpdb; | |
$course_id = get_the_ID(); | |
$data = $wpdb->get_results("SELECT post_modified_gmt FROM {$wpdb->posts} WHERE `ID` = $course_id", ARRAY_A); | |
echo '<div class="last_modified_date_of_course"> Last Updated On: '.date ( 'Y-M-d', strtotime($data[0]['post_modified_gmt'])).'</div>'; | |
return; | |
},10); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment