我的 Wordpress 主题具有特殊格式的日期。您可以在此处查看网站: 链接到页面
我一直在使用 qTranslate,但我不确定如何更改这个特殊日期。我想把日期写成日文和英文。这是编码:
if (have_posts())
while (have_posts()):
the_post();
global $post;
$results = $wp_query->post_count;
$data_event = get_post_meta($post->ID, 'event_date_interval', true);
$time = strtotime($data_event);
$pretty_date_yy = date('Y', $time);
$pretty_date_M = date('M', $time);
$pretty_date_d = date('d', $time);
$image_id = get_post_thumbnail_id();
$cover = wp_get_attachment_image_src($image_id, 'event-cover-arc');
$image_id = get_post_thumbnail_id();
$event_location = get_post_meta($post->ID, "event_location", true);
$event_venue = get_post_meta($post->ID, "event_venue", true);
$tstart = get_post_meta($post->ID, 'event_tstart', true);
$tend = get_post_meta($post->ID, 'event_tend', true);
$event_ticket = get_post_meta($post->ID, "event_ticket", true);
$event_out = get_post_meta($post->ID, "event_out", true);
$event_cancel = get_post_meta($post->ID, "event_cancel", true);
$event_zoom = get_post_meta($post->ID, "event_zoom", true);
$coordinated = get_post_meta($post->ID, "event_coordinated", true);
$club = get_post_meta($post->ID, "event_venue", true);
$event_allday = get_post_meta($post->ID, "event_allday", true, true);
echo '
<div class="event-cover">';
if ($data_event != null) {
echo '
<div class="event-single-data">
<div class="event-single-day">' . $pretty_date_d . '</div>
<div class="event-single-month">' . $pretty_date_M . '</div>
<div class="event-single-year">' . $pretty_date_yy . '</div>
</div>
</div><!-- end .event-cover -->';
}