admin管理员组文章数量:1026989
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 badges1 Answer
Reset to default 0You cannot do this without modifying WordPress core files.
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 badges1 Answer
Reset to default 0You cannot do this without modifying WordPress core files.
本文标签: Modify Url for Edit Post Screen in Custom Post Type
版权声明:本文标题:Modify Url for Edit Post Screen in Custom Post Type 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://it.en369.cn/questions/1745596307a2158192.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论