Forums

Pulling the most recent post on another page (3 posts)

  1. kylesevans
    Member
    Posted 4 years ago #

    As a n00b, I'll apologize if this has already been addressed in detail (a search through the archive didn't yield much help).

    Say I've got a WordPress blog at http://www.somedomain.com/blog/ - what is the most efficient way of pulling the most recent post and putting it into a div at http://www.somedomain.com/?

    Any help would be much appreciated!

    Kyle

  2. MichaelH
    Volunteer
    Posted 4 years ago #

    Please consider making WordPress accessible at http://www.somedomain.com instead.

    1. In Administration > Options > General, change your Blog address (URL) to http://www.echobloom.com
    2. Create an index.php in web-root folder (same folder that holds wordpress):

    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', true);
    require('./blog/wp-blog-header.php');
    ?>

    3. Update your permalinks.

    Even though the actual WordPress files reside in a sub-directory, with index.php file in your webroot, and the with Options->General admin page Blog address (URL) is changed so that WordPress acts as your main page. This particular setup is described in Giving_WordPress_Its_Own_Directory

    Finally, look at the Administration > Options > Reading settings to make a static front page showing that one post.

  3. kylesevans
    Member
    Posted 4 years ago #

    Thanks so much for your prompt responsee - that was very helpful.

    The problem I'm having specifically though is with the static front page that displays the most recent post. I've investigated RSS parsers that display the description field of the post, but it seems to be only ~50 words, so is of limited use for this particular problem.

    I apologize for my limited vocabulary on this, but it seems like there's got to be a pretty simple way to do this...

Topic Closed

This topic has been closed to new replies.

About this Topic