• Hey,

    On my website https://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="https://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 https://www.stevesbarfridge.com/feed and i get this error

    XML Parsing Error: junk after document element
    Location: https://stevesbarfridge.com/feed
    Line Number 641, Column 1:<script language="JavaScript" type="text/javascript" src="https://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)
  • 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.