Title: Rss Reading Custom Code
Last modified: August 19, 2016

---

# Rss Reading Custom Code

 *  [kv0nza](https://wordpress.org/support/users/kv0nza/)
 * (@kv0nza)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/rss-reading-custom-code/)
 * Hey,
 * On my website [http://www.stevesbarfridge.com](http://www.stevesbarfridge.com)
   i have added some cod eon the index.php for a stats script:
 *     ```
       <?php
       /* Short and sweet */
       define('WP_USE_THEMES', true);
       require('./wp-blog-header.php');
       ?>
       <!-- START OF MNM-STATS PRO INSERTION CODE -->
       <script language="JavaScript" type="text/javascript" src="http://xxxxx.info/Stats/counter_js.php"></script>
       <!-- END OF MNM-STATS PRO INSERTION CODE -->
       ```
   
 * But this code is being added to the rss feed at [http://www.stevesbarfridge.com/feed](http://www.stevesbarfridge.com/feed)
   and i get this error
 *     ```
       XML Parsing Error: junk after document element
       Location: http://stevesbarfridge.com/feed
       Line Number 641, Column 1:<script language="JavaScript" type="text/javascript" src="http://xxxxx.info/Stats/counter_js.php"></script>
       ```
   
 * ^
 * So i was wondering if there is a plugin/tag/workaround to stop rss reading this
   code?
 * Thanks kv0nza

Viewing 1 replies (of 1 total)

 *  [Chris_K](https://wordpress.org/support/users/handysolo/)
 * (@handysolo)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/rss-reading-custom-code/#post-774204)
 * Don’t add code to the main index.php!
 * Instead, add the stats code to your theme’s header or footer file instead.

Viewing 1 replies (of 1 total)

The topic ‘Rss Reading Custom Code’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Chris_K](https://wordpress.org/support/users/handysolo/)
 * Last activity: [17 years, 10 months ago](https://wordpress.org/support/topic/rss-reading-custom-code/#post-774204)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
