<?php $loop = new WP_Query( array(
’orderby’=>’ID’,
’order’=>’ASC’,
’post_type’ => ‘sample’,
’posts_per_page’ => 10) ); ?>
<?php if (have_posts()) : ?>
<?php while ( $loop->have_posts()) : $loop->the_post(); ?>
<?php
echo get_post_meta($post->ID, ‘name’, true);
・
・
・
?>
こう書き直しました。すみません動きません。画面が真っ白に...
プラグインで Custom Field Suite を使用し
カスタムフィールドを作成し、
($post->ID, ‘name’, true) の name の部分でフィールドの項目名を指定して
出力させています。
クラスメソッドのhave_posts, the_post を使用した際は、
どのように echo get_post_meta($post->ID, ‘name’, true); の部分を
書いたら良いのでしょう?
そのままでよいのでしょうか?