Forums

"Integrating WordPress with Your Website" question. (1 post)

  1. perfectheat
    Member
    Posted 2 years ago #

    Hi. I'm wondering how a "grab the header" code would look like if the headers pointed to all the latest posts instead of just the one clicked on. Basically I just want it to open another php file, in this case news.php. And I also have this inside an iFrame so it has to open in the same location.

    // Get the last 3 posts.
    <?php
    require('/the/path/to/your/wp-blog-header.php');
    ?>

    <?php query_posts('showposts=3'); ?>
    <?php while (have_posts()) : the_post(); ?>
    " rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?>
    <?php endwhile;?>

    Thank you for all your help! Have a nice day.

Topic Closed

This topic has been closed to new replies.

About this Topic