read post-date from mySQL-db
-
Hi,
i have follow php-script:
<?php
$today = current_time(‘mysql’, 1);
if ( $recentposts = $wpdb->get_results(“SELECT ID, post_title FROM $wpdb->posts WHERE post_status = ‘publish’ AND post_date_gmt < ‘$today’ ORDER BY post_date DESC LIMIT 10”)):
?>i will add the date of the post see in follow php-code:
<?php the_time(‘d. F Y’) ?>and if a entry from today, will i see the hour
<?php the_time(‘H:i’) ?>how can i make it? Or is impossible?
- The topic ‘read post-date from mySQL-db’ is closed to new replies.