admin管理员组

文章数量:1279182

I want to redirect the existing posts (nearly 2000) to a custom post type (say news) without interrupting newly created normal posts say (apps) after that, would that be possible?

I want to redirect the existing posts (nearly 2000) to a custom post type (say news) without interrupting newly created normal posts say (apps) after that, would that be possible?

Share Improve this question asked Oct 4, 2021 at 14:03 Aman RawatAman Rawat 52 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

create a way to check the post date, and make a if statment

if( $date_of_post < '2021-10-08') {
    header('Location:https://google');
    die();
} 

本文标签: Redirect Existing Post to CPT