Ready to get started?Download WordPress


Latest blog post in footer (12 posts)

  1. benjaminWP
    Posted 2 years ago #

  2. Steven Jones
    Posted 2 years ago #

  3. benjaminWP
    Posted 2 years ago #

    I still havent figured this out please can someone help me please?

  4. add the latest post / news title and exceprt in my footer

    edit footer.php, find a suitable location, and add for example:

    <?php $latest = new WP_Query( array( 'posts_per_page' => 1 ));
    if( $latest->have_posts() ) : ?>
    <div class="latest-post">
    <?php while( $latest->have_posts() ) : $latest->the_post(); ?>
    <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
    <?php the_excerpt(); ?>
    <?php endwhile; ?>
    <?php endif; wp_reset_postdata(); ?>


  5. benjaminWP
    Posted 2 years ago #

    Hi alchymyth,

    Thank you very much for this. It is perfect and it works well in my theme. I think I need to start to code more in php wordpress to get as good as you.

    Thanks again :)

  6. JaxAce
    Posted 2 years ago #

    How do you get the thumbnail show?

  7. @JaxAce

    please start your own topic;

    if you need to refer to this topic here, add a link to your topic.

  8. BEdesign
    Posted 2 years ago #

    I wouldn't mind knowing this to be honest! I know alchymyth kindly helped me last time but I would like to know this. I have used a plugin for this but it doesn't work and I have tried to play with the PHP code but to no avil. Any suggeststions?

    Thanks :)

  9. WPyogi
    Forum Moderator
    Posted 2 years ago #

    As he just posted, start your own thread.

  10. BEdesign
    Posted 2 years ago #


    Have a look at the OP!! That would be me ;)

  11. it is really not helpful to post from different accounts with different usernames and to expect anybody to do the detective work to figure this out.

    the Codex has information on 'featured images' also known as post_thumbnails: http://codex.wordpress.org/Post_Thumbnails

    what exactly have you tried in the code?

  12. BEdesign
    Posted 2 years ago #


    Wow I didn't even notice that I had two accounts! I lost one a while back and couldn't remember the user / pass! Anyway, I have been to the link that you provided and have written my own code, I will have another blast at it but though that you might have a easy solution. Thanks again for your help.

Topic Closed

This topic has been closed to new replies.

About this Topic