你好,我正在检查默认帖子类型页面中是否有自定义帖子类型的url,所以我使用了
if(get_the_permalink($customID)){
echo \'true\';
}else{
echo \'false\';
}
即使$customID不存在,它也总是回显为真的get_the_permalink();
函数,我知道get_post_status()
但我需要用get_the_permalink
你好,我正在检查默认帖子类型页面中是否有自定义帖子类型的url,所以我使用了
if(get_the_permalink($customID)){
echo \'true\';
}else{
echo \'false\';
}
即使$customID不存在,它也总是回显为真的get_the_permalink();
函数,我知道get_post_status()
但我需要用get_the_permalink
你只需要检查一下$customID
首先设置。E、 g。
if ($customID && get_permalink ($customID)) {
echo \'true\';
} else {
echo \'false\';
}
我有自定义帖子,我创建了一个显示所有自定义帖子的页面。示例:www.example.com/archive-page我想知道是否可以更改与此自定义帖子相关的类别和标签的永久链接。现在我有:www.example.com/my-custom-post-type-cats/my-category-1www.example.com/my-custom-post-type-tags/my-tag-1</我想要这样的东西:www.example.com/archive-page?category=1www.e