Support » Fixing WordPress » Ajaxed auto reload div troubleshooting

  • One of the most weird problems of all times…

    With the aid of prototype.js, i added an ajaxed div auto-reloader on my page. It means that, instead of auto refreshing the whole page, thanks to this script, i can make auto-refreshed each minute one of the divs. Now I want to do it for the published posts listing. In other words, I want to the the titles (with their links of course) of the recent posts in a div which will be auto reloded each minute.

    Now… The problem is that the script that i use obliges me to use a php include structure to do it. And when I try to applicate, it gives me this: “Fatal error: Call to undefined function: have_posts() in /nfs/c02/h07/mnt/39816/domains/ on line 1”

    Let me paste the script here:

    <script src="" type="text/javascript"></script>
    <script type="text/javascript" language="javascript">
    var count = 0;
    function test() {
    var myAjax = new Ajax.PeriodicalUpdater(
    'content', // div to update
    method: 'get', // HTTP
    evalScripts: true, //
    frequency: 2, //
    decay: 0 //
    test(); //run without click

    And in the body part, I have this:

    <div id="content">
    <?php include('news.php'); ?>

    I think that I must create a new root file which I should call news.php but I don’t know how to do it. I tried to hack wp-blog-header.php, template-loader.php etc. It doesn’t work.

    Are there anyone who know to create a second root file besides index.php?

    Thanx a lot…


Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Ajaxed auto reload div troubleshooting’ is closed to new replies.