Redirect to latest post

Home Forums ZeroGravity Pro Redirect to latest post

This topic contains 0 replies, has 1 voice, and was last updated by  jebwebb 3 years, 8 months ago.

Viewing 1 post (of 1 total)
  • Author
  • #266


    I found a very useful way to redirect the index page to go to the latest post page. I broke the preview feature in the theme, but this is really important to my users because they don’t want to see the excerpt page first when visiting my site. I can do without the preview for now. I’m just making a suggestion to add this as a feature to the theme. I see this request a lot in other wordpress forums and there is no easy solution. I don’t recommend anyone do this if they don’t know php and if you do do it, keep a copy of the original index page in case it doesn’t work. I just have to keep this in mind if the theme updates. (Unless, of course, you add it as a feature) 😉

    I replaced the whole index.php content with:

    if (have_posts()) : the_post();
    header("location: ".get_permalink());

    (Replace & codes with symbols as needed)

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.