<?php
global $wp_query;
$postID = $wp_query->post->ID;
$customfield = get_post_meta($postID, 'フィールド名', true);
echo $customfield;
?>
(さらに…)タグ: ループ外
-
WordPress:ACFをループの外で使いたい
<?php
global $wp_query;
$postID = $wp_query->post->ID;
$customfield = get_post_meta($postID, 'フィールド名', true);
echo $customfield;
?>
(さらに…)