• So I hacked my own website to get WordPress to appear within my template. The code structure is below – and it works quite well. The problem is that when I try to generate a feed from my page using http://www.mysite.com/news/?feed=rss I get errors that look like this:

    Warning: Cannot modify header information – headers already sent by
    (output started at d:\inetpub\mysite\news\index.php:95) in d:\inetpub\mysite\news\wp-rss2.php on line 8
    http://www.mysite.com/news mysite news Wed, 08 Feb 2006 19:48:16 +0000 http://wordpress.org/?v=2.0.1
    en http://www.mysite.com/news/?p=5

    Is there a way to generate the feed without the template hack I put in?

    <html>
    <body>
    my html code
    <?php
    /* Short and sweet */
    define('WP_USE_THEMES', false);
    require('./wp-blog-header.php'); get_header();
    ?>
    <div id="content" class="narrowcolumn">

    <?php if (have_posts()) : ?>

    <?php while (have_posts()) : the_post(); ?>

    <div class="post" id="post-<?php the_ID(); ?>">
    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small>

    <div class="entry">
    <?php the_content('Read the rest of this entry &raquo;'); ?>
    </div>

    <p class="postmetadata">Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' |'); ?> </p>
    </div>

    <?php endwhile; ?>

    <div class="navigation">
    <div class="alignleft"><?php next_posts_link('&laquo; Previous Entries') ?></div>
    <div class="alignright"><?php previous_posts_link('Next Entries &raquo;') ?></div>
    </div>

    <?php else : ?>

    <h2 class="center">Not Found</h2>
    <p class="center">Sorry, but you are looking for something that isn't here.</p>
    <?php include (TEMPLATEPATH . "/searchform.php"); ?>

    <?php endif; ?>

    </div>

    more of my html code
    <body>
    </html>

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Feed has problems when WordPress is encapsulated in my own site’ is closed to new replies.