WordPress.org

Ready to get started?Download WordPress

Forums

Can I show 1 'recent-post' on another page? (6 posts)

  1. Mark Bloomfield
    Member
    Posted 9 years ago #

    Hey.

    I have my blog running on a different page than my index page. I would like to have the most recent entry pulled into a specific place on my index page... almost like an 'include' but just of the recent entry. so as a new entry gets posted, it'll change it on the index page too...

    I have absolutely jack php knowledge so some assistance would be greatly appreciated.

    I would like the recent entry to be displayed in the "blah blah" box seen here: http://www.yellow-llama.com/temp/ (temp directory for new site)
    and my blog is here: http://www.yellow-llama.com/blog/

    I appreciate any help i can get. thanks...

  2. Kafkaesqui

    Posted 9 years ago #

    Follow through on the info from this link (and what it also links to):

    http://wordpress.org/support/topic/33081#post-187146

    Then insert The Loop where you want the post content to appear, but just before your loop code begins, add this:

    <?php query_posts('showposts=1'); ?>

  3. Mark Bloomfield
    Member
    Posted 9 years ago #

    thanks Kafkaesqui for your reply.

    the catch is, in my case, that i'm running my blog in a separate directory to the page that i want to bring the excerpt to:
    ie:

    i want the excerpt here under 'blah blah'
    and it must pull the recent entry from my blog here (which is yet to be customized like the rest of my site)

    i wonder if you could guide me thru this process?

    excuse my ignorance! :)

  4. Michael Bishop

    Posted 9 years ago #

    Just thinking out loud, but you can make a static pages with WP, could you not simply modify a template to be similar to the one in your /temp , then do something like this. You could do the same with your other pages. That way, everything is in the same directory

  5. OtherMichael
    Member
    Posted 8 years ago #

    Just a follow-up: by following these directions, you can include a post in a page held in an external directory. Just make sure that your [Path_to_WordPress] is accurate in the require statement.

  6. witchy
    Member
    Posted 7 years ago #

    yellowllama, this is exactly what I want to do. What did you finally do to resolve this issue? I've been to your site (very nice) and it looks like you might have made a different decision about the whole idea?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags