php – How to assign page id with array in page_scheduled_event
Question
How to assign multiple unique page ids with the below code –
i have tried 'ID' => array('ID1, ID2, ID3),
but not worked.
function publishhome() {
$time = current_time('mysql');
$arg = array(
'ID' => 16696, //here
'post_date' => $time,
'post_date_gmt' => get_gmt_from_date( $time ),
'post_status' => 'publish'
);
wp_update_post( $arg );
}
0
11 months
2022-03-20T08:36:24-05:00
2022-03-20T08:36:24-05:00 0 Answers
0 views
0
Leave an answer