Support » Fixing WordPress » Displaying my latest post on a seperate website

  • Resolved tktest

    (@tktest)


    Hi All,

    Im pretty new to wordpress and have come across something that i just cant find the answer to…

    I have integrated a blog/news sections into a site i am building and it took a while to get it on the website but it’s on now and working pretty well.

    The thing is i simply installed the wordpress blog into a sub directory called news but i really want to display my latest post on the actual homepage of the website.

    Does anyone know how to do this?

    thanks

    Craig

Viewing 4 replies - 1 through 4 (of 4 total)
  • My advise would be to run the whole site from WordPress & set the home page to display latest posts in the admin section.

    I agree with sales@4bo.com

    If you set your home page as a WordPress page, then you can modify the front-page.php template to display your home page content and the latest post.

    Thanks guys your tips helped alot, i have managed to sort this now.
    I added this above everything in the homepage…

    <?php /* Short and sweet */ define(‘WP_USE_THEMES’, false); require(‘news/wp-blog-header.php’); ?>

    and then this where i wanted the post to display…

    <?php query_posts(‘showposts=1’); ?> <?php while (have_posts()) : the_post(); ?> <?php getImage(‘1’); ?>
    <?PHP THE_TITLE(); ?>
    <?php the_excerpt(); ?>
    read more <?php endwhile;?>

    this works great.

    Glad you got it to working!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Displaying my latest post on a seperate website’ is closed to new replies.