I think It´s not a hack but I need to change this code to conditional but I don´t know how.
I need that if this custom type content doesn´t exist, the title and space to it doesn´t show in site. How can I do this?
<a href="<?php
$download = get_post_meta($post->ID, 'brochura-pdf', true);
echo wp_get_attachment_url($download);
?>" target="_blank">Brochura</a></br>
<?php $video = get_post_meta($post -> ID, 'video Youtube',true) ?>
<?php echo $video; ?>
I tried with this but I get error message:
<?php if $download = get_post_meta($post->ID, 'manual em pdf', true) {?>
<a href="<?php
$download = get_post_meta($post->ID, 'manual em pdf', true);
echo wp_get_attachment_url($download);
?>" target="_blank">Manual</a></br>
<?php } else {?>
nothing
<?php }?>