Support » Plugins » "Wp ajax random posts" problem with template.

  • I have this weird issue I can’t solve with a plugin I’m using called ‘wp ajax random posts”. It basically allows you to create a section where you can refresh a loop of posts with a button or automatically. I have to change the function that controls the template though because I only want to show the embedded video and it’s rating. The problem in this function is when I change get_the_title() with youtube_video_embed( $name, “autoplay=on&width=640&height=376” ) or the_ratings(). When I change it the first post loads and on refresh a second post loads under it and then that second post refreshes itself like it should while the first post remains overtop. I looked at the source and the iframe and the ratings appear outside of the li tags I put it in even though they are inside in the function which is the problem. So how can I fix that? Here’s the function in question with the youtube function substituted for get_the_title().

    [Code moderated as per the Forum Rules. Please use the pastebin]

Viewing 2 replies - 1 through 2 (of 2 total)
  • here’s the pastebin for the function pastebin

    I found a piece of code in the js that deals with destroying the post and i’m wondering if this is the issue for why it doesnt proccess the iframe inside the li tags. Here it is.

    function removeNode(obj){
    		if(typeof obj == "string")$(obj).parentNode.removeChild($(obj));
    		else obj.parentNode.removeChild(obj);
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘"Wp ajax random posts" problem with template.’ is closed to new replies.