I would like to use arrows to dynamically change which posts appear in a div by cycling through an array of say 5 posts. How would i approach this issue?
I have made the array that the get posts function is assigned to a global variable, but that's the only thing i have done so far, as I am kind of stumped. I tried using the debug log to print the array to get some sense of how to use it, but it doesn't make any sense at all.
Would this have something to do with wp_localize_script()? Also I'm looking to have three of these on my front page so, if I use wp_localize_script() can i use this three times? To pass three separate arrays of posts?