Wednesday 18 March 2015

WordPress Useful Functions

 Previous & Next Function with the images


<?php previous_post_link('%link', '<img src="/images/prev-icn.jpg">', TRUE); ?>


<?php next_post_link( '%link', '<img src="/images/nxt-icn.jpg">', TRUE ); ?>










Get The Featured Image for the Post

<?php
if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
    the_post_thumbnail('full');
}
?>