• I created a static homepage for my WordPress site. Now, I want to put the latest/most recent blog post at the bottom of the homepage. I looked this up online and found one solution, but the problem is that it put the latest blog post on the bottom of every static page. Does anyone know how I can have the latest blog post show up at the bottom of just the homepage?

    I am using the Inove theme.

    Thanks,
    Tom

Viewing 3 replies - 1 through 3 (of 3 total)
  • You could use the is_front_page() conditional:

    <?php if( is_front_page() ) :?>
    [ latest/most recent blog post code ]
    <?php endif;?>

    Or you could look at creating a custom page template for your front page.

    Thread Starter tom92373

    (@tom92373)

    I tried adding that code to my page.php page, but it gave me an error. Here is the code that I tried:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Thread Starter tom92373

    (@tom92373)

    I wasn’t adding the second ‘<?php endif;?>’ to the end of the code. I added it and it works like a charm! Thanks esmi!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to add latest post to bottom of static homepage?’ is closed to new replies.