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

filters - Edit Post Permalink option removed, looking for possible causes

programmeradmin6浏览0评论

The edit post permalink button is totally removed ( not hidden with css ) from the edit view - but the slug is still editable from both the Quick Edit view and also via the "slug" panel which I can show from Screen Options.

I am looking for some hints ( wp filters or JS perhaps ) which will help me locate the code which is removing this feature.

Checking the other post types, I can edit permalinks normally on pages.

Things I have done:

  • reset all user permissions, this made no difference.
  • check how post types are registered
  • Check post type supports calls for changes to the Post post type
  • Looked at other CPT's I have registered, some which have the permalink disabled by returning false for rewrite ( but this totally removes the permalink feature )
  • Checked as many other obvious places I can
  • Checked ACF group settings in case any were set-up to hide permalinks

Things I will do, if no handy search hints help me locate the issue:

  • Turn off plugins / themes one by one and try to locate the issue.

Edit Post view:

Quick Edit view:

Post edit slug meta box:

Edit page view:

CPT with rewrite => false:

Permalink HTML:

The edit post permalink button is totally removed ( not hidden with css ) from the edit view - but the slug is still editable from both the Quick Edit view and also via the "slug" panel which I can show from Screen Options.

I am looking for some hints ( wp filters or JS perhaps ) which will help me locate the code which is removing this feature.

Checking the other post types, I can edit permalinks normally on pages.

Things I have done:

  • reset all user permissions, this made no difference.
  • check how post types are registered
  • Check post type supports calls for changes to the Post post type
  • Looked at other CPT's I have registered, some which have the permalink disabled by returning false for rewrite ( but this totally removes the permalink feature )
  • Checked as many other obvious places I can
  • Checked ACF group settings in case any were set-up to hide permalinks

Things I will do, if no handy search hints help me locate the issue:

  • Turn off plugins / themes one by one and try to locate the issue.

Edit Post view:

Quick Edit view:

Post edit slug meta box:

Edit page view:

CPT with rewrite => false:

Permalink HTML:

Share Improve this question asked Aug 1, 2020 at 12:22 Q StudioQ Studio 2,5267 gold badges25 silver badges39 bronze badges 1
  • 2 Keep in mind this isn't a discussion forum, answers will need to solve and answer your question fully, so you need to word your question in a way that lets people answer it factually and fully, in a way that all people with this problem will look at the answer and say "yes, that is the answer", not just what helped you most. To start with, disable all plugins and switch to the default theme to see if a particular plugin or your theme causes this – Tom J Nowell Commented Aug 1, 2020 at 12:41
Add a comment  | 

1 Answer 1

Reset to default 0

The answer was an admin filter on post_link which was building a custom permalink and returning false in some edge-cases, which caused the edit button to be hidden.

发布评论

评论列表(0)

  1. 暂无评论