WP Dapatkan Nilai Bidang Meta
<?php $key_1_value = get_post_meta( get_the_ID(), 'key_1', true ); ?>
Modern Marten
<?php $key_1_value = get_post_meta( get_the_ID(), 'key_1', true ); ?>
get_post_meta( int $post_id, string $key = '', bool $single = false )
<?php if ( get_post_meta( get_the_ID(), 'thumb', true ) ) : ?>
<a href="<?php the_permalink() ?>" rel="bookmark">
<img class="thumb" src="<?php echo esc_url( get_post_meta( get_the_ID(), 'thumb', true ) ); ?>" alt="<?php the_title_attribute(); ?>" />
</a>
<?php endif; ?>