我原以为这是术语meta,但这似乎不正确。
为了便于说明,我创建了一个名为“Test”的类别,其中有一个“Test”的slug。
我正在用以下内容更新其term\\u meta:
update_term_meta( 64, \'test_meta\', \'asdfasdf\' );
这与其他元键/值一起出现在termmeta表中:get\\u term(64)返回以下内容:WP_Term Object ( [term_id] => 64 [name] => Test [slug] => test [term_group] => 0 [term_taxonomy_id] => 64 [taxonomy] => category [description] => [parent] => 0 [count] => 0 [filter] => raw [meta] => Array ( ) )为什么是
[meta]
空的get_term_meta(64)
按预期返回:
Array
(
[headline] => Array
(
[0] =>
)
[intro_text] => Array
(
[0] =>
)
[display_title] => Array
(
[0] => 0
)
[display_description] => Array
(
[0] => 0
)
[doctitle] => Array
(
[0] =>
)
[description] => Array
(
[0] => Meta desc
)
[keywords] => Array
(
[0] => someMetaKeyword
)
[layout] => Array
(
[0] =>
)
[noindex] => Array
(
[0] => 0
)
[nofollow] => Array
(
[0] => 0
)
[noarchive] => Array
(
[0] => 0
)
[test_meta] => Array
(
[0] => asdfasdf
)
)