Today's Posts Follow Us On Twitter! TFL Members on Twitter  
Forum search: Advanced Search  
Navigation
Marketplace
  Members Login:
Lost password?
  Forum Statistics:
Forum Members: 24,254
Total Threads: 80,792
Total Posts: 566,472
There are 968 users currently browsing (tf).
 
  Our Partners:
 
  TalkFreelance     Design and Development     Programming     PHP and MySQL :

RSS Feed...

Thread title: RSS Feed...
Closed Thread    
    Thread tools Search this thread Display Modes  
12-20-2008, 01:07 PM
#1
Seb is offline Seb
Seb's Avatar
Status: Watermelon Man
Join date: Nov 2006
Location: London
Expertise:
Software:
 
Posts: 3,312
iTrader: 36 / 100%
 

Seb is on a distinguished road

  Old  RSS Feed...

Hm, didn't know where to put this.

Basically, my Wordpress feed is mucked up because it's outputting the site HTML in the feed file (which means it won't work).

I haven't done a proper WP integration. I have just copied my website template file and created a Wordpress Loop in the content area to grab the post data, replacing that with WP's default index file.

At the top of the file I have this:

PHP Code:
<?php
      define
('WP_USE_THEMES'false); 
      require(
'./wp-blog-header.php'); 
?>
Then in the content area I have this:

PHP Code:
<?php while (have_posts()) : the_post(); ?> 
    <div class="post">
        <p><strong><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></strong> -         <?php the_time('d-m-Y'); ?> </p> 

        <?php the_content(); ?>
        
            <?php edit_post_link(__('Edit')); ?>
</div>
    <?php endwhile; ?>

    <div style="text-align:center;"> 
        <?php posts_nav_link(' — '__('&laquo; Previous Page'), __('Next Page &raquo;')); ?> 
    </div>
Perhaps this is why the feed is outputting the HTML after it?


Here's the page it's on - http://www.codedpreview.com/news

Anyone know how to sort this? Let me know if you have any questions...

01-12-2009, 07:49 PM
#2
trench is offline trench
Status: I'm new around here
Join date: Nov 2008
Location:
Expertise:
Software:
 
Posts: 13
iTrader: 0 / 0%
 

trench is on a distinguished road

  Old

Im guessing that the require('./wp-blog-header.php'); includes the HTML.

02-25-2009, 01:42 AM
#3
Rust3d is offline Rust3d
Status: Junior Member
Join date: Feb 2009
Location:
Expertise:
Software:
 
Posts: 29
iTrader: 0 / 0%
 

Rust3d is on a distinguished road

  Old

Originally Posted by trench View Post
Im guessing that the require('./wp-blog-header.php'); includes the HTML.
I double that, that should perhaps be the reason.

Closed Thread    


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

  Posting Rules  
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump:
 
  Contains New Posts Forum Contains New Posts   Contains No New Posts Forum Contains No New Posts   A Closed Forum Forum is Closed