badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

Home page redirect to most recent post

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #26795
    tyson
    Participant

    When I add this code to index file, it doesn’t work. It says it encountered redirect problem.

    <?php
    require(‘./wp-blog-header.php’);
    if (have_posts()) : the_post();
    header(“location: “.get_permalink());
    exit;
    endif;
    ?>

    How can I have the home page automatically re-direct to most recent post?

    #26808

    Hi tyson,

    To have automatically display your blog goto dashboard-> settings-> reading and choose your latest post.
    Then your latest post will be displayed in your index file.

    Thank you!

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.