I am not implementing this on this website but I thought this would be a good reference.
If you want to forward a user to the latest blog post, you can make a new php document and link to that. In the php document should be the following code:
<?php require_once("../../../wp-blog-header.php"); $latest = get_posts( "post_type=post&offset=0&numberposts=1" ); $permalink = get_permalink( $latest[0] ); wp_redirect( $permalink ); //print_r( $permalink ); ?>
If you want to link to an image of the most current post create a new php document with this code:
<?php require_once("../../../wp-blog-header.php"); header("Content-Type: image/jpeg"); $latest = get_posts( "post_type=post&offset=0&numberposts=1" ); $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($latest[0]->ID)); $url = $thumb[0]; readfile($url); ?>
Hope this helps someone