I'm a JavaScript/jQuery beginner interested in the steps required to create the following function within a WordPress site.
I'd like to have a list of posts, each of which contain a video embed, that auto-plays the video upon page load and, when the video is completed, auto-loads the next post in the category within the browser (and so on). The effect would be a self-navigating viewing experience that takes the user across all video posts in a category & can recognize post order within that category.
In more detail, I'm looking to use JavaScript or jQuery as a solution to:
- Output all posts using the WordPress loop (thumbnail & post title) within a gallery style page that can be filtered by category.
- Assign an order to those posts based on the selected category.
- When a user clicks the thumbnail, they are taken to the respective post.
- When on the selected post page, the embedded video auto-plays after page loads.
- When the embedded video finishes, the next post in the category is auto-loaded in the browser.
- The user can also use navigation links within the post template to manually navigate to the previous post, next post, or 'exit' back to the gallery page, which is still filtered by the selected category.
- When the embedded video in the last post in a category is finished playing, the browser is auto-directed to the first post in the category, creating an infinite loop.
- These functions should work even if certain posts have multiple categories & base the post order on the post order of the currently selected category.
If there is a plugin which achieves most or all of these, that'd work for me too. I appreciate any help or input. Thanks.
Aucun commentaire:
Enregistrer un commentaire