0
게시 게시물과 다른 게시물 유형에서 "get_post_meta"를 찾고 싶습니다. 여기에 내 코드는 이지만이 게시물 유형의 모든 게시물의 post_meta를 표시합니다! 동일한 슬러그 (post_name)를 가진 게시물을 비교할 수 있다고 생각하지만 어떻게 해야할지 모르겠습니다!게시 게시물과 다른 게시물 유형의 게시물 메타 가져 오기
<?php $sectionscontact = new WP_query(array('post_type' => 'sections-contact', 'post_count'=>1));if ($sectionscontact->have_posts()): while ($sectionscontact->have_posts()) : $sectionscontact->the_post(); $telephone_meta_empty = get_post_meta(451,'telephone', true);
if (! empty ($telephone_meta_empty)) { ?>
<div class="tp_titre_bloc" style="border-right:1px solid #999999;"> Téléphone</div>
<div class="tp_content_bloc">
<?php echo get_post_meta(get_the_ID(), 'telephone', true); ?>
</div>
<?php } ?>