自定义模板文件:
当前主题文件夹下,新建一个php文件,名字自定义,如:redirect.php
<?php /*Template Name: Redirect*/
if(have_posts()) {
the_post();
#新界面打开
#echo "<script>window.open('" . get_the_excerpt() . "');</script>";
echo header("Location:". get_the_excerpt());
}
?>
进入wp后台
页面——新建页面——内容中直接写url——模板 选择上一步创建的Redirect