Support » How-To and Troubleshooting » How to reedirect home to the last post

How to reedirect home to the last post

  • I just want to know how can i, when you enter my site let’s say http://mysite.com/ that what appears is my last post on wordpress, like if the last post permalink was “happy days”, when someone enters the site ( http://mysite.com/ )he will go directly to http://mysite.com/happy-days/ or if the last post was “opening”, it would go to http://mysite.com/opening/ , ohh and if that’s not possible with wordpress is there any possible workaround?, yes i know you can make it show only the last post, but i want it to show the comments and everything else when you enter the site, thank you.

Viewing 5 replies - 1 through 5 (of 5 total)
  • So no one knows how?, i’ve already checked the documentation, and i can’t find a way.



    You might look at Creating_a_Static_Front_Page and see if you could adapt some of those approaches a bit.

    As you’ve likely guessed, this isn’t a common request.

    You could try modifying the file “single.php” that is in your defaul (Kubrick) theme to suit your needs. That is the file used to render the page when you select a single post to be displayed.



    Try adding this just before The Loop in your theme’s index.php (or home.php, if it has one):

    $wp_query->is_home = false;
    $wp_query->is_single = true;

    This may change the way your sidebar, etc. are displayed, so you can reverse it after the post loop if you need to clear up anything:

    $wp_query->is_home = true;
    $wp_query->is_single = false;

    Thanks Everyone, that last one Kafkaesqui said worked, but it seems navigation is not possible, previous_post_link doesn’t seem to work, i tried the single.php but the same thing happens (i can only use the posts_nav_link, but i want point to the urls directly not to page/2/ page/3/), Static i tried in the first place same problem.

    In last resort i think i’ll just make a “splash page” with the link to the last post (taken from the feed or something), so the first page a person sees is the last post…

    But if anyone has another idea, i would appreciate it ^^

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to reedirect home to the last post’ is closed to new replies.