admin管理员组文章数量:1326338
)
I found
(for example in Set default (auto) slug prefix for Tags)
that it is possible for example add my-taxonomy
prefix in front of all taxonomy slugs
(permalinks). The post is outdated now since such prefix can be now specified in WP settings.
What can't be done in settings it to specify slug
prefix (=> modify slug) for a specific/custom post type. There are some plugins that can do that but they usually do a lot of things and I'd prefer to write a couple of lines of code that I can add to functions.php/custom plugin/mu-plugin...
In other words I'm trying to write PHP that gets fired just after a post (with defined type) is created and that alters slug from my-new-post
to my-prefix/my-new-post
.
I spent two days of googling / testing but I haven't been able to make it work. At least not for post_type
attachment
.
Could you please help me with that?
Thank you.
Best regards,
Mat
本文标签: pluginsAlter post slug by a filter that is fired just after a post is created
版权声明:本文标题:plugins - Alter post slug by a filter that is fired just after a post is created 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742199655a2431720.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论