I'm having a problem that I don't quite know how to resolve on my own. I built a horizontal widget with TubePress, and it functions properly. However, I need to customize the pagination options, and that's where I get lost...

Instead of having pagination above or below the videos, I just want a 'previous' arrow on the left, and a 'next' arrow on the right. When clicked, the videos should load with AJAX, avoiding a complete page reload.

I'm building the site on my local server, so unfortunately I can't provide a link. So here's a graphic design of what I'm trying to achieve:

Does anyone know how I can achieve this? I would sincerely appreciate it if someone could point me in the right direction!

The HTML for pagination is one area that TubePress isn't set up for easy customization - mostly because nobody has really asked for it before you :) I looked at the pagination code to see if it could be easily hacked to get what you're after, but my hunch is that it might be a bit messy. The problem, as I'm sure you've surmised by now, is that TubePress currently spits out the pagination as a single chunk of ( < prev ... 2 3 4 ... next > ). We'd have to teach it to separate the prev and next buttons.

Let me continue to think on it and hopefully I'll come up with a solution that will be easy to implement..

These lines conditionally spit out the HTML for the top and bottom pagination. What we're going to do is manipulate these chunks of HTML to display only the "next" or "prev" links, instead of the whole pagination code. Regular expressions to the rescue!

The very last step will be to position the "next" and "prev" links on the sides of your thumbnails. You could probably do that with just CSS, but if you need to move around those chunks of PHP you're free to do that as well. I've tested this code locally and it works perfectly. Just make sure you haven't disabled pagination for the gallery (otherwise you won't get any pagination!)