I faced an interesting challenge last week: I wanted to add subtitles to a video I had inserted in a page with WordPress’ Core Video Shortcode, but I couldn’t find any shortcode parameter allowing me to specify a subtitle file.
I checked the shortcode’s source code but couldn’t find any “subtitle” attribute there. The Codex page wasn’t helpful either. After more digging, I realized that the whole thing could in fact be done!
When using the core WordPress video player, follow these steps to add subtitles to a video:
- Under Media > Library, add a new video.
- Once it’s uploaded / converted, click to open its details page, and copy the video URL from there.
- Go to Posts > Add new to start writing your new post.
- In that draft, add a new Classic block.
- In that Classic block, switch to the HTML view.
- In there, add the following:
- Switch back to the Visual view.
- Click on the video, and then on the little pencil icon appearing above the video:
- In the modal that pops up, you’ll be able to add new subtitles thanks to the menu on the left. You will also be able to make changes to every other option for that video.
- Save your changes, and you’re all set!
I edited the Codex page to mention the video editor, and I hope this post will help others who may be googling to find out how to add subtitles to WordPress videos. ?
By the way, if you’re looking to create subtitles for a video you’ve created, I would recommend that you give Amara a try; their translating interface is really good.