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

Modify Url for Edit Post Screen in Custom Post Type

programmeradmin1浏览0评论

Ive looked at the questions that may have already answered what im needing and came up short...Im modifying a plugin and the custom post-type name shows in the url when adding a new post.

But..when I edit a post, the url shows up like this: /wp-admin/post.php?post=2059&action=edit

With 2059 being the post ID. What I would like is when editing the post for the url to contain the custom post-type name also.

So instead of above, it would show something like: /wp-admin/admin.php?page=custom_pt_name&post=2059&action=edit or /wp-admin/admin.php?post_type=custom_pt_name&post=2059&action=edit

I appreciate the help

Ive looked at the questions that may have already answered what im needing and came up short...Im modifying a plugin and the custom post-type name shows in the url when adding a new post.

But..when I edit a post, the url shows up like this: /wp-admin/post.php?post=2059&action=edit

With 2059 being the post ID. What I would like is when editing the post for the url to contain the custom post-type name also.

So instead of above, it would show something like: /wp-admin/admin.php?page=custom_pt_name&post=2059&action=edit or /wp-admin/admin.php?post_type=custom_pt_name&post=2059&action=edit

I appreciate the help

Share Improve this question asked Apr 11, 2019 at 23:37 captainMcaptainM 217 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

You cannot do this without modifying WordPress core files.

发布评论

评论列表(0)

  1. 暂无评论