7 replies
Hey all

I've got a blog with a static home page, but I would like to add a mini-loop to the page that pulls the latest 5 or 10 blog posts.

The good news is, I know what I need. The bad news is I have no idea how to implement it.

Anyone want to give me a hand and I'll send some Paypal love your way. Just post here or send me a PM with the cost.

  • Profile picture of the author Jose Delgado
    On your dashboard got to Design > widgets > Add Recent Posts to the sidebar and choose how many recent posts you want it to show.

    Works for me. If it doesn't for you, It might be the theme.
    {{ DiscussionBoard.errors[167402].message }}
  • Profile picture of the author thecableguy
    In your dashboard go to Settings/Reading and you can change the number of posts that's displayed, also how the feeds are shown and the homepage.

    {{ DiscussionBoard.errors[167449].message }}
  • Profile picture of the author Mark McWilliams
    The post from Jose will work if you have a sidebar, and Alan's is right in what he says but because it's a static homepage, that will have no effect on it! - Have you got a link Jen that we can take a look at?

    It'll just be a matter of adding some PHP code into the theme file, all of which shouldn't take very long!

    Obviously if you want to style the way it looks, then you can do so.

    The code to get the latest 5 posts is:

    PHP Code:
    <?php get_archives('postbypost'5); ?>
    And the code to get the latest 10 posts would be:

    PHP Code:
    <?php get_archives('postbypost'10); ?>
    (You just need to change the number at the end to decide on how many posts you'd like!)

    Hope that helps! - And, I hope I've understood your question!

    On mark.mcwilliams.me or @markmcwilliams you'll find me!
    {{ DiscussionBoard.errors[167470].message }}
  • Profile picture of the author Jen McVey
    Mark's got it right, guys...I've got the widgets on the side bar to add the most recent posts, etc., but I also want them under the static home page content itself.

    Here's an example of what I mean (where it says "More recent news"): http://laurabowers.net/
    {{ DiscussionBoard.errors[167546].message }}
  • Profile picture of the author Ouroboros

    There's a wordpress plug-in that allows you to put posts into pages. It's called inline posts. I think it may be just what you're looking for.


    Need a Simple Product/Service to Market to Offline Clients? Sell Them DFY Custom Videos. https://www.fiverr.com/users/gigsiteguy

    {{ DiscussionBoard.errors[167705].message }}
  • Profile picture of the author Bishop81
    If you can't find a plugin or anything to do it for you, send me a PM and I'll modify your theme to do that.

    I'm tired of my signature... Deleted.

    {{ DiscussionBoard.errors[167857].message }}

Trending Topics