• Resolved WPChina

    (@wordpresschina)


    Is there a plugin that can enable me to provide a .js file to my users so they can paste javascript into their pages to syndicate my RSS feed?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Not that I’ve ever seen.

    Feedburner will do it though, for what that’s worth.

    Thread Starter WPChina

    (@wordpresschina)

    ah, thanks, I hope instead there is something that can do it on the blog-side so I don’t need to use an outside service.

    I have had some success with this trick. Create a PHP page (say, jsfeed.php) in the root directory of your WordPress blog. It will be, however, called as a Javascript page. Depending on what information you want, the PHP is used to create the content for Javascript. For example, a simple list of titles:

    while (have_posts()) : the_post(); ?>
    document.write("<a href='<?php the_permalink() ?>'><?php the_title(); ?></a>");
    <?php endwhile; ?>

    This is called on an HTML page with:

    <script language="JavaScript" src="http://bloglocation/jsfeed.php" />
    Thread Starter WPChina

    (@wordpresschina)

    Perfect! Thanks!

    eric23,

    I’ve used the code you provided, but I’m getting an error:
    undefined function have_posts()

    Can you tell me what whole jsfeed.php file should look like?

    This would make a great plugin!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Is there a plugin that changes RSS to Javascript for syndication?’ is closed to new replies.