New Topic

Reply To: Make Front Page the most recent post

Home › Forum › Customization › Make Front Page the most recent post › Reply To: Make Front Page the most recent post



This will require a custom page template. Please note that this is a special request and we’re not aware of any theme that has such capability by default, so you know, it’s not somehow a limitation of StartupPro, no theme has such capability out-of-the-box.

1. If you don’t already have a child theme setup, set one up:

2. Add a new custom page template to your child theme named home-post.php with the contents:

<?php /* Template Name: Home Post */ ?>
<?php get_header(); ?>
<div id="content">
<?php query_posts( 'posts_per_page=1' ); ?>
<?php while ( have_posts() ) : the_post() ?>
<?php get_template_part('entry'); ?>
<?php comments_template(); ?>
<?php endwhile; ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>

3. In your WP admin, create a new page named “Home Post” and assign it the custom template.

4. Under Settings > Reading set “Home Post” as the static frontpage.

This is untested, but should work.