Problem With Random Video in Custom Loop
-
I hope I’m posting in the right place. I’m developing locally but the problem is perhaps more general.
On the homepage template I’ve added a custom loop to bring in a post at random from the ‘videos’ category. It works fine at bringing in a random post’s title and content but the embedded video (part of the content) ends up displaying the same one for every post. It’s as though the embed video gets cached somewhere and doesn’t get substituted when a new one comes along.
Visiting the posts themselves, there is no problem.
I’m using the Boiler Plate theme and ‘Advanced Custom Fields’ plugin. The code surrounding my custom loop is below. The first loop uses ACF’s the_field and draws data defined specifically for the page. The second loop has the problem:
[Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]
Thanks in advance for any help.
Lau
- The topic ‘Problem With Random Video in Custom Loop’ is closed to new replies.