开发者

What columns stores the slug in wordpress

In wordpress, what column stores the slug (either auto generated, or user entered)?

I can not find this in either wp_posts or wp_开发者_JS百科postmeta. The wp_posts GUID stores a direct link, but not the slug.


The slug for Posts and Pages are stored in the wp_posts posts table in the column post_name. Just be aware that all the automatic saves as well as attachments are stored in the same table, so there will not be a solid column full of slugs, but only one for each "parent" (parent to the revisions) Post or Page.


At the risk of heresy, I am going to say it is not completely true. I was updating some slugs and found the post_name field does not change. On further searching, I found the wp_postmeta table has an entry under meta_key name 'custom_permalink' that has the latest slug path.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜