Im using a cool plugin called "wp ajax random posts". It basically lets me call a function into a template that can auto refresh a loop of posts. It works great until I tried to change the loop structure inside the function. My posts have embedded youtube videos so I set it up so the section was only calling the video and its ratings. Originally it was just for a title and that worked fine but when I added the video it returns a second post under the original that was suppose to dissapear. From there it refreshes the bottom video like normal which boggles my mind. Here's the original function and then the modified one. Can someone point out why this is happening?

Ok so to test further I used the original code that works and simply replaced '.get_the_title().' with '.the_ratings().'. That resulted in the same problem I had before. The first ratings appears and then another one under on refresh and then the second refreshes normally. What am I missing?
–
Pollux KhafraFeb 7 '12 at 17:40

I compared the two source codes between the two and noticed with the ratings functions in place the the ratings appear before the li and not inside the tags which must be the problem. But why is that happening when I placed it inside the tags?
–
Pollux KhafraFeb 7 '12 at 18:01

I still haven't figured this out for anything and really need to figure out what's wrong.
–
Pollux KhafraFeb 9 '12 at 2:11