$post->ID, 'puppy-db-url', true ) ): ?> <!-- 追加するボタン(リンク)のHTMLタグ --> <div class="puppy-db-link"><a href="<?php echo esc_url( get_post_meta( $post->ID, 'puppy-db-url', true ) ); ?>" title="<?php the_title(); ?>" target="_blank">詳細・お問合せはこちら</a></div> <?php // IFここまで endif; ?>