"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]
- The topic ‘"Wp ajax random posts" problem with template.’ is closed to new replies.