WordPress.org

Ready to get started?Download WordPress

Forums

Have a "latest post" feed on a completely different page? (4 posts)

  1. Scyze
    Member
    Posted 6 years ago #

    Hi folks, I'm trying to figure something out. I've got a website, and I want to have a little column that will always display a little preview to the latest news post on my WordPress. The WordPress is on a subdomain on the domain of the page I want to put it on, so it's not like I'm plugging it into a WordPress default page--not sure how a plugin would work here, if any.

    I just want a little thing to display and automatically update the latest post from that blog. How would I go about doing this?

  2. Scyze
    Member
    Posted 6 years ago #

    Ah, no juice? :/

  3. veevee
    Member
    Posted 6 years ago #

    You would need to build a custom php page that could echo content from the database that wordpress is writing to.
    Not worth it.

    My recomendation is to make a wordpress page, like an about page or something you aren't using for your blog, cut out all of the wordpress calls except for the recent posts plugin (there are a couple out there), and put all of the regular static html content back in it. If you apply the same css to that page as to the rest of your non-wp site, users will only be able to tell that its a part of your blog by looking at the address.

    That make sense? I didn't do a very good job of explaining.

  4. Len
    Member
    Posted 6 years ago #

    Assuming the page you're talking about is a PHP page, include the following at the top,

    <?php
    define('WP_USE_THEMES', false);
    require(./wp/wp-blog-header.php');
    ?>

    ...where wp is the subdomain folder you speak of. All WordPress template tags should now work.

Topic Closed

This topic has been closed to new replies.

About this Topic