Insert date in Scroll post excerpt
-
Hi, I’m trying to insert the date in every post that scrolls with this plugin.
The code I modified is:
if ( ! empty($spe_data) ) { $spe_count = 0; foreach ( $spe_data as $spe_data ) { $spe_post_title = trim($spe_data->post_title, @$spe_excerpt_length); $spe_post_title = mysql_real_escape_string($spe_post_title); $spe_post_date = trim($spe_data->post_date); $get_permalink = get_permalink($spe_data->ID); $spe_dp_clean = spe_dp_clean($spe_data->post_content, @$spe_excerpt_length); $spe_dp_clean = mysql_real_escape_string($spe_dp_clean); $dis_height = $dis_num_height."px"; $spe_html = $spe_html . "<div class='spe_div' style='height:$dis_height;padding:2px 0px 2px 0px;'>"; $spe_html = $spe_html . "<div class='spe_link'><a href='$get_permalink'>$spe_date $spe_post_title</a></div>"; /* $spe_html = $spe_html . "<div class='spe_excerpt'>$spe_dp_clean...</div>";*/ $spe_html = $spe_html . "</div>"; $spe_x = $spe_x . "spe_array[$spe_count] = '<div class=\'spe_div\' style=\'height:$dis_height;padding:2px 0px 2px 0px;\'><div class=\'spe_link\'><a href=\'$get_permalink\'>$spe_post_date $spe_post_title</a></div></div>';"/*<div class=\'spe_excerpt\'>$spe_dp_clean...</div></div>'; "*/; $spe_count++; }
I added:
$spe_post_date = trim($spe_data->post_date);
but I get the date in this format: 2012-12-05 15:36:54 while I want it to be like this: 05 December, 15:36.
Is there a simple hack to accomplish this?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Insert date in Scroll post excerpt’ is closed to new replies.