Created
February 3, 2021 09:31
-
-
Save rohit-ghoghari/93cb38eab7cfafb667f8a2e7557b0e71 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Use below code to show metabox values from anywhere | |
$id = get_the_ID(); | |
$banner_img = get_post_meta($id, 'post_banner_img', true); | |
$banner_img = explode(',', $banner_img); | |
if(!empty($banner_img)) { | |
?> | |
<table class="plugin-detail-tabl" width="100%" cellspacing="0" cellpadding="0"> | |
<tbody> | |
<?php foreach ($banner_img as $attachment_id) { ?> | |
<tr> | |
<td><img src="<?php echo wp_get_attachment_url( $attachment_id );?>"></td> | |
</tr> | |
<?php } ?> | |
</tbody> | |
</table> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment