Here is code to check post or page has an attachment in wordpress. You have to in wordpress loop.
<?php
if ( is_attachment() ) {
echo 'Has an Attachment';
} else {
echo 'Not has an Attachment';
}
?>
Here is code to check post or page has an attachment in wordpress. You have to in wordpress loop.
<?php
if ( is_attachment() ) {
echo 'Has an Attachment';
} else {
echo 'Not has an Attachment';
}
?>