Make PHP work with HTML tags
Question
I have the required code for what I want
<?php if ( is_singular() ) {
<?php if (get_post_meta(get_the_ID(), 'square_image', true)) { ?> <img src="<?php echo get_post_meta($post->ID, 'square_image', true); ?>"/> <?php } else { ?> <?php the_post_thumbnail( 'thumbnail' );?> <?php } ?>
} else {
}
?>
but I simply don’t know how to make the PHP work along with HTML, and inside another PHP code. Please help me make this code work
thank you
0
9 months
2022-05-15T06:47:56-05:00
2022-05-15T06:47:56-05:00 0 Answers
0 views
0
Leave an answer