我觉得你有点搞砸了。我想你用的是ACF plugin 因为你曾经the_field().
你只试过吗the_field(\'titdesc\'); 如果你在WordPress循环中?这些函数已经查询存储在postmeta 桌子我假设你有一个叫做titdesc 因为你想用the_field(\'titdesc\').
如果不在循环中,也必须传递post ID,如the_field(\'titdesc\', 2055);.
据我所知,ACF在每个自定义字段中使用两行。对您而言,它是:
titdesc => and some experience, coffee & fun._titdesc => field_51baf57155c20
第一对值存储字段名称
titdesc 和字段值
and some experience, coffee & fun. 第二对值是对字段名唯一ID的引用,即
field_51baf57155c20 在这里
作为说明,get_field() 将return a值和the_field() 将echo “值。”
如果要在函数中传递值,应使用get_field() 相反你的var_dump() 输出是为特定post ID存储的所有元数据。