WordPress snippet #1

Useful little piece of WordPress code, plays a particularly useful part of a dynamic featured post slideshow that I was going to detail at some point. To reference the  set upload directory url in your WordPress theme:

<?php $upload_dir = wp_upload_dir(); ?>

<?php echo $upload_dir[‘baseurl’]; ?>

more info here http://codex.wordpress.org/Function_Reference/wp_upload_dir

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>