Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在functions.php 文件中,有没有办法获取自定义帖子类型的自定义字段数据?我想知道根据传递的任何帖子 ID 的数据是什么?
<?php $id = YOUR_POST_ID; $meta = get_post_meta($id, 'custom_field_name', true); echo $meta; ?>