最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

permalinks - Private post caught in endless redirect loop

programmeradmin0浏览0评论

I have an old post set to private. When I visit it in a browser, Network in DevTools shows that it is endlessly redirecting to itself. I have switched off my redirect plugin, that didn't help.

I wondered if it was a canonical redirect, so I tried this in functions.php:

remove_filter('template_redirect', 'redirect_canonical');

No success, so I tried:

remove_action('template_redirect', 'wp_old_slug_redirect');

And, that has fixed it. However, I then checked for old slugs:

SELECT * FROM `wp_postmeta` WHERE `meta_key` = '_wp_old_slug'

There is no entry with the relevant post_ID?! How do I fix this one page?

发布评论

评论列表(0)

  1. 暂无评论