0
所以我需要使按鈕或鏈接將更新發布發佈日期。如何更新發布日期發佈日期點擊wordpress
我發現這個,但我不知道如何調用它。
$time = current_time('mysql');
wp_update_post(
array (
'ID' => $id,
'post_date' => $time,
'post_date_gmt' => get_gmt_from_date($time)
)
);
您可以查看[http://stackoverflow.com/questions/13114270/wordpress-plugin-how-to-因爲你的問題與此相似,所以你需要更改日期時間(http://stackoverflow.com/questions/13114270/wordpress-plugin-how-to-change-the-post-date-time)。 – Ninja