WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to show latest post on my home page (outside of wp)? (8 posts)

  1. yanbu
    Member
    Posted 9 years ago #

    I have a community online drawing site, and i'd like to feature the latest wordpress post on the main page outside of wordpress. What's the best way of going about this?

    I would be showing the the post in a fixed table on the other page, also curious about how it will format or fit in. If anyone has a page where this is already happening, i'd love to see the link to check it out. Thanks in advance.

  2. ifelse
    Member
    Posted 9 years ago #

    [Edited as I misread the OP's question. My apologies]

  3. yanbu
    Member
    Posted 9 years ago #

    It looks like that is your weblog itself though, right? I'm looking to feature the last post on a separate PHP page outside of wordpress.

  4. yanbu
    Member
    Posted 9 years ago #

    sorry, I guess I didn't make that clear (i edited the post to be more clear, my fault) - I mean to say, I have a website that isn't weblog based and i'd like to be able to show the latest post on the main page of my site.

  5. ifelse
    Member
    Posted 9 years ago #

    If the blog is located on the same server, then you can
    include('/path/to/wp-blog-header.php');
    This will allow you to use the standard WP functions.

  6. Aha! This was just what I was looking for! Thanks, ifelse.

    For others who may have been banging their head on the monitor, what I did was stick that include line in my site's index page, then I went into the /wp-admin/index.php page and found the dashboard sidebar bits. I pasted that in my new site index page where I wanted, and tweaked out things I didn't need, like the "edit" links.

    Now I have to figure out how to change the "Latest Posts" links to the actual post itself (or just the blog address) and not the post-edit section. I also have to add a few more bits, like the Pages list, and links to some of the more popular categories and a Flickr stream.

    And yes, I know the styling is awful, and the CSS is worse. I'm working on it because I've since learned how to do it *right*. or at least better. ;)

    This is a very handy thing to have for an index page or site-portal type thingy, as I do have some visitors coming in through the main site index and not the blog index, which is what everyone else has linked to.

    The more I learn what I can do with WP the more I love.

  7. tommyhaych
    Member
    Posted 9 years ago #

    I tried the same thing and all I get is a blank page :S

  8. Beel
    Member
    Posted 9 years ago #

    You can also use CG-Feedread and you don't even have to be on the same site.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags