WordPress.org

Ready to get started?Download WordPress

Forums

How to reedirect home to the last post (6 posts)

  1. fanvid
    Member
    Posted 7 years ago #

    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.

  2. fanvid
    Member
    Posted 7 years ago #

    So no one knows how?, i've already checked the documentation, and i can't find a way.

  3. Chris_K
    Member
    Posted 7 years ago #

    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.

  4. billh
    Member
    Posted 7 years ago #

    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.

  5. Kafkaesqui

    Posted 7 years ago #

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

    <?php
    $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:

    <?php
    $wp_query->is_home = true;
    $wp_query->is_single = false;
    ?>

  6. fanvid
    Member
    Posted 7 years ago #

    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 ^^

Topic Closed

This topic has been closed to new replies.

About this Topic