Using thumbnails for post navigation in a custom WordPress theme