Permalink Problems

There isn’t really enough code as an example to fully understand if there is any additional issues, but the main thing which is causing the URL’s to not work is the fact that the opening anchor tag is not closed. Adding a "> to the end of the first line should fix the issue. In addition the art-PostMetadataHeader div should be closed.

<a href="https://wordpress.stackexchange.com/questions/452/<?php the_permalink(); ?>">
<?php endif; ?>
<?php $metadataContent = ob_get_clean(); ?>
<?php if (trim($metadataContent) != ''): ?>
<div class="art-PostMetadataHeader">
    <?php echo $metadataContent; ?>
</div>
</a>

Having said that, nesting a block level element such as a div inside of an inline element such as an anchor is not standards compliant, but this code would have the same effect of linking all the $metadataContent, while being standards compliant.

<?php endif; ?>
<?php $metadataContent = ob_get_clean(); ?>
<?php if (trim($metadataContent) != ''): ?>
<div class="art-PostMetadataHeader">
   <a href="https://wordpress.stackexchange.com/questions/452/<?php the_permalink(); ?>"><?php echo $metadataContent; ?></a>
</div>

tech