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
Simplepie and integrating/parsing RSS feeds
Wow, how’s that for a snappy blog title!
Ok, I realise it sounds slightly dull but utilising RSS feeds can be a useful and relatively straight-forward way to include dynamic information within a site.
I’ve searched far and wide for various RSS integration tools and my favourite is by far and away a RSS parsing class written in php called Simplepie (http://simplepie.org/). Although this hasn’t been developed since version 1.2 was released in 2009 it remains the most straightforward and robust solution I’ve found.
Once you’ve downloaded and included the simplepie.inc file it’s so simple (excuse the pun) to use (here is a very good tutorial on how to set up a simple page featuring one feed). If you want to include multiple feeds there is some helpful info here.
But this is the best solution … Read More »
Recent Comments