什么是 wp_postmeta table

What is the wp_postmeta table

据我了解,wp_postmeta 扩展了 wp_post 的架构。所以基本上 post 的标准 fields/structure 将在 wp_post 中找到,如果任何 post(s) 需要他们自己的一套 fields/attributes 等,它们将在 wp_postmeta table 中定义。所以我想知道我对此是否正确?

谢谢。

你完全正确。 如果存在某些元框或 "own set of fields/attributes" wp_postmeta table 将存储这些字段的值。

看看这个:https://codex.wordpress.org/images/2/2a/WP3.9.4-ERD.png

wp_postmeta(类似于用户的 wp_usermeta 和评论的 wp_commentmenta)存储以某种方式连接到 post 的任何附加信息,尤其是用户定义的。

使用函数

add_post_meta()
update_post_meta()
get_post_meta()

已经在实现对象和数组 serialization/deserialization(以及更多)以存储未存储在 wp_posts table.[=12 中的自定义信息=]