0
我想在頁面中顯示單個發佈對象,但它就好像沒有選擇任何東西。我已經試過的var_dump它,它返回falseACF發佈對象返回false
<?php $post_object = get_field('resource');
var_dump($post_object);
if ($post_object):
$post = $post_object;
setup_postdata($post); ?>
<div><?php the_title(); ?></div>
<?php wp_reset_postdata(); ?>
<?php endif; ?>
哪些文檔? –
ACF https://www.advancedcustomfields.com/resources/post-object/ –