Support » Fixing WordPress » Code Insertion

  • I am trying to insert code, and it keeps dropping information. I think that this is why it won’t display properly. These are surrounded in the proper code tags with dogears around it.

    <?PHP srssfetcher(‘’, 20, true, true, true); ?>


    <!–P srssfetcher(‘’, 20, true, true, true);–>

Viewing 6 replies - 1 through 6 (of 6 total)
  • I just noticed, it’s not fetcher that’s working as a widget, that’s broken as well. I guess it must be something with the widget. Anyway, is there a way to get the core RSS feed widget to dump out to the main body of a page?

    WP destroys my code all the time.

    WordPress will strip out certain tags, like PHP, divs, etc in pages and in posts. is a great plugin for allowing you to keep your PHP code in posts.

    The following code will dump your rss feed.

    $file = fopen(“”, “r”);
    while ( ! feof($file) ) {
    $text = fgets($file);

  • <?php echo $text;?>
  • <?php } ?>

    Replace with whatever the path to your wordpress feed is.

Sorry, the forum stripped some of my code, although nothing important. But you get the idea. Let me know if this helps.

forum stripped some of my code

Use the “code” button… that’s why it is there: highlight your code and click on that freakin’ button!

Thanks Moshu. I realized it after. 🙂
It only took out my li tags as far as I could tell though, which weren’t vital, just made it look better.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Code Insertion’ is closed to new replies.