Top

vtxyzzy on "Custom Field auto add download link in post."

July 3, 2010 by  

Without being able to see your code, I can only give general guidelines.

Your code should be something like this:

<?php $url = get_post_meta($post->ID,'Download Link',true);
if ($url) { ?>
   <a href="<?php echo $url; ?>">Download <?php the_title(); ?></a>
<?php } ?>

You should be aware that this might open up your blog to hackers who put malicious code in the ‘Download Link’ field.

Share

Comments

Facebook comments:

Feel free to leave a comment...
and oh, if you want a pic to show with your comment, go get a gravatar!





*
Bottom